Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-145260

Whitelist on state inconsistency

XMLWordPrintable

    • Icon: Bug 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:

      1. In server.properties, white-list to false and enforce-whitelist to true
      2. Op some player (the exact one does not matter; just /op playername will work)
      3. Deop that same player (/deop playername)
      4. 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.

            Unassigned Unassigned
            aikar Aikar
            Votes:
            5 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: