All doorlocks showed a 15 second autolock even if not setup with one until script was restarted.
wofnull opened this issue · 5 comments
Hello we monitored a problem with the doorlock script yesterday and are no shure what caused the problem primary:
We have around 75 - 100 concurrent players in prime time and are monitoring weird behaviour witht the doorlock system from time to time and could at least pinpoint one event yesterday:
All our doorlocks are normaly setup without autoclose, only 5 out of around 400 Doorlocks have an autoclose intervall of around 15 seconds.
Yesterday we got informed that some doors that are normaly opened are closed.
While investigating the issue, we found that EVERY Doorlock was set to Autoclose after 15 seconds. We checked the database -> there were still only 5 doors set with an autoclose intervall.
After restarting the script the doorlocks worked again as intended.
We are currently not shure why the doorlock system was pulling an autolock for every single lock instead of the given setting in the database. We have no Server or Client side error logs for the doorlock system giving a hint what was causing this or when this started to happen
Worrying is, that the doorlock setting was correctly existing in the database for all doors and was not pulled correctly until the script was restarted.
We are using the current 1.12.1 and did not have created doors for about the last 3 days. We had this issue only once yesterday and we were not able to reproduce it after the script restart.
Well
we found that EVERY Doorlock was set to Autoclose after 15 seconds
You checked that these doors were set to autoclose how?
some doors that are normaly opened are closed.
Doesn't really mean much if somebody can toggle the door.
Double checked directly in the UI for about 15 - 20 doors , and with opening known doors without autolock and waiting for autoclosure ( which happened ). As said before, doors were autoclosing and in DB these doors had no autoclose set and were fine after script restart.
About the ability to toogle: we know this part, for security measurements we have a discord webhook for Locking / Unlocking doors setup. and these doors reported where not changed in their state since they were setup weeks ago.
The only way to edit door settings is with editDoor
export on the server, and the ox_doorlock:editDoorlock
net event which checks ace perms - both update the database when changing settings. The only setting not synced to database is the door's current state, so autolock would have to match that value.
Double checked directly in the UI for about 15 - 20 doors
They all said autolock was enabled? Are you using release or git? Did you rebuild UI after that fix? Does any other resource on the server trigger ox_doorlock:setState
on clients? What kind of changes have you made to the script?
Reviewing the code I don't see any way values could randomly change or for somebody to trigger them with arbitrary data - and if they could, it would have to update in the database.