I’ve always wondered why a toilet door on UK trains are so wierdly designed. Who knew it was so hard to design something as simple as a toilet door lock(from I hacked a train toilet)
Modern trains in the UK have disabled toilets with power-operated doors. The older models of these toilets had “open”, ”close” and “lock” buttons on the inside, where you had to press “close”, wait for the door to close, and then press ”lock”. There is no separate “unlock” button; pressing the “open” button on the inside automatically unlocks and opens the door.
Of course, there is a reason for the separation of the closing and locking functions, but not the opening and unlocking functions: it avoids a Denial of Service attack where someone can just press “close” and then jump out before the door closes. If the interior “close” button automatically locked the door, this would result in the toilet becoming permanently inaccessible.
The problem with this design is that most people don’t understand state machines, and this design confused a lot of people who were unable to lock the door correctly, or believed they’d locked the door when they hadn’t.