MantisBT - Zandronum
View Issue Details
0004067Zandronum[All Projects] Bugpublic2022-12-29 17:292024-01-01 01:39
Kaminsky 
Kaminsky 
highmajoralways
resolvedfixed 
3.1 
3.23.2 
0004067: Clients kicked by the server for wrong version/password can still trigger DISCONNECT scripts
Clients who haven't fully connected to a server but are kicked for using the wrong version (e.g. connecting to a 3.2-alpha server with a 3.1 client) or connect password can still execute DISCONNECT ACS scripts. These scripts should only be executed if players that were already in the game (i.e. not a true spectator) leave. Clients that are still connecting to the server are obviously not in the game yet, so it shouldn't be executing when they disconnect.

This can be a problem for mods that use these script types, and in some cases exploitable.
1. Host a server (either 3.1 or 3.2-alpha) with disconnecttest.wad loaded, and also set sv_password to something that isn't blank. If a player disconnects from the game, the message "Oh my god, a player left!" will be printed for everyone.

2. Have one client join the server with the correct version and password. Make sure they successfully connect to the server.

3. Have a second client join the server with the wrong version or password. They will be kicked before they connect, but the aforementioned message will still be printed, indicating that the script executed.
Thanks a lot to Langrenus for reporting the issue.
No tags attached.
? disconnecttest.wad (387) 2022-12-29 17:29
https://zandronum.com/tracker/file_download.php?file_id=2796&type=bug
Issue History
2022-12-29 17:29KaminskyNew Issue
2022-12-29 17:29KaminskyStatusnew => assigned
2022-12-29 17:29KaminskyAssigned To => Kaminsky
2022-12-29 17:29KaminskyFile Added: disconnecttest.wad
2023-03-24 14:38KaminskyAdditional Information Updatedbug_revision_view_page.php?rev_id=13947#r13947
2023-03-26 21:05KaminskyNote Added: 0022820
2023-03-26 21:05KaminskyStatusassigned => needs testing
2024-01-01 01:39Ru5tK1ngNote Added: 0022947
2024-01-01 01:39Ru5tK1ngStatusneeds testing => resolved
2024-01-01 01:39Ru5tK1ngResolutionopen => fixed
2024-01-01 01:39Ru5tK1ngFixed in Version => 3.2

Notes
(0022820)
Kaminsky   
2023-03-26 21:05   
This issue should be fixed with:'http://hg.osdn.net/view/zandronum/zandronum-stable/rev/328e98119da6 [^]'
(0022947)
Ru5tK1ng   
2024-01-01 01:39   
Ran test wad with r231220 and connected 2 clients. One client disconnected and triggered the disconnect script. A new client with the incorrect password did not join and did not trigger the script.