-
Bug
-
Resolution: Unresolved
-
None
-
Minecraft 1.13.2, 1.15.2, 1.18 Pre-release 7
-
Confirmed
-
(Unassigned)
The servers whitelist state is duplicated in the "PlayerList" class as well as the WhiteList JSON object.
Some things reference the Whitelist object to determine if whitelist is on, such as the code for enforce-whitelist, while others reference the player list.
This creates a bug where if enforce-whitelist is on, but whitelist is OFF, the Json objects status is ON and deop'ing a player will kick everyone from the server even though whitelist is disabled.
Recommendation is to get rid of the boolean state in PlayerList and have it always reference the WhiteList objects status.
To reproduce:
- In server.properties, white-list to false and enforce-whitelist to true
- Op some player (the exact one does not matter; just /op playername will work)
- Deop that same player (/deop playername)
- Observe that you are kicked on running the deop command with a not whitelisted message, but can still rejoin afterwards.
The same thing happens when (adding and) removing any player from the whitelist; both deoping and removing from the whitelist cause the whitelist enforcement to be triggered (even if there is no whitelist active). Players who are in the whitelist will not be kicked (even though the whitelist is disabled), though opped players not in the whitelist still will be kicked.