The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: RESTRICTED ACCOUNT on May 26, 2021, 01:18:14 PM

Title: [Abuse] Player can unlock the other player's schedule button by switching the wa
Post by: RESTRICTED ACCOUNT on May 26, 2021, 01:18:14 PM
Reproducibility: 100%

Reproduction procedure:
(1) Open the Player A's line management dialog.
(2) Keep it open and switch to Player B (at this point the button on that dialog will be locked once)
(3) Switch the waytype tab of Player A's Line management dialog
(4) The Edit Line button will be unlocked, so use it to open the schedule edit dialog.
(5) The opened dialog is Player A's Line, but Player B can edit it freely. (´・ω・`)
(6) Withdraw all button is also available
(7) Retire all Player A's convoys  :P


You can also change the line name.  ;) This is another issue and you can change it at any time without having to go through the steps above.


This was brought about by a merge from the standard or it has been lurking for a long time. And it was still reproducible as of r9274. I don't know how it is now in standard. The related dialogs are currently undergoing major changes. I would appreciate it if someone could confirm it.

This is caused by calling update_lineinfo(). The button is then unlocked. There are some other processes to unlock the button.

I threw a pull request to fix this. please confirm.
https://github.com/jamespetts/simutrans-extended/pull/383
Title: Re: [Abuse] Player can unlock the other player's schedule button by switching the wa
Post by: prissi on May 26, 2021, 01:24:57 PM
I wonder why this works. In standard this just brings up the password dialog. The same should happen with extended, at least if this is done properly via the tools.
Title: Re: [Abuse] Player can unlock the other player's schedule button by switching the wa
Post by: RESTRICTED ACCOUNT on May 26, 2021, 01:47:39 PM
I think password entry is only relevant for locked players. It works fine.
I think the current specification is that we can't change the schedule of other players. So even if player want to edit the schedule of an unlocked player, you still need to switch players once.
The schedule list dialog also behaves like that in the initial state, but the above operation causes inconsistent behavior.
For example, the convoy dialog also disables the schedule button for other players, whether locked or not.
Title: Re: [Abuse] Player can unlock the other player's schedule button by switching the wa
Post by: RealAmerican1776 on May 26, 2021, 02:33:43 PM
I noticed that when they updated a while back, they gave public player more... power if you will. Did you change public player to player 2? That might be why.
Title: Re: [Abuse] Player can unlock the other player's schedule button by switching the wa
Post by: prissi on May 27, 2021, 07:45:18 AM
Maybe r9832 does more what you expect.
Title: Re: [Abuse] Player can unlock the other player's schedule button by switching the wa
Post by: jamespetts on May 29, 2021, 12:31:05 PM
I have incorporated Ranran's fix for this - thank you.