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

ban expiration date in banned-players.json isn't functional / banned-ips experation date doesn't fully work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 1.13.1
    • Minecraft 15w31c, Minecraft 15w36d, Minecraft 15w43c, Minecraft 15w44a, Minecraft 15w44b, Minecraft 15w45a, Minecraft 15w46a, Minecraft 15w47a, Minecraft 15w49a, Minecraft 15w49b, Minecraft 15w50a, Minecraft 15w51a, Minecraft 15w51b, Minecraft 16w02a, Minecraft 16w03a, Minecraft 16w04a, Minecraft 16w05b, Minecraft 16w06a, Minecraft 16w07a, Minecraft 16w07b, Minecraft 1.9 Pre-Release 1, Minecraft 1.9 Pre-Release 2, Minecraft 1.9 Pre-Release 3, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 2, Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 16w14a, Minecraft 16w15a, Minecraft 16w15b, Minecraft 1.9.3 Pre-Release 1, Minecraft 1.9.3 Pre-Release 3, Minecraft 1.9.4, Minecraft 16w20a, Minecraft 1.10 Pre-Release 2, Minecraft 1.10.2, Minecraft 1.11 Pre-Release 1, Minecraft 1.12, Minecraft 1.12.1 Pre-Release 1, Minecraft 1.12.2, Minecraft 18w19b
    • Confirmed

      The bug

      You can use the expiration time in banned-players.json, and the message "Your ban will be removed on xxxxx" shows up fine.
      The issue is, it doesn't unban when the time has passed the "expires" time

      I banned myself for 1 minute to test it, and I waited about 10 minutes and it still doesn't let me in.

      (Just a note, you can't use the expires in the command, only by direct editing the banned-players.json / banned-ips.json file)

      banned-ips.json works fine, you can connect afterwards, but you get an error each first time you try to connect since server restart since expiration date is reached.

      Client
      Internal Exception: io.netty.handler.codec.DecoderException: java.io.IOException: Bad packet id 26
      
      Server
      [21:43:15] [Server thread/WARN]: Failed to handle packet for /IPBLACKEDOUT
      0
      java.lang.NullPointerException
              at mm.a(SourceFile:383) ~[minecraft_server.jar:?]
              at md.b(SourceFile:97) ~[minecraft_server.jar:?]
              at md.c(SourceFile:62) ~[minecraft_server.jar:?]
              at ek.a(SourceFile:232) ~[minecraft_server.jar:?]
              at ma.c(SourceFile:187) [minecraft_server.jar:?]
              at net.minecraft.server.MinecraftServer.D(SourceFile:643) [minecraft_ser
      ver.jar:?]
              at la.D(SourceFile:339) [minecraft_server.jar:?]
              at net.minecraft.server.MinecraftServer.C(SourceFile:553) [minecraft_ser
      ver.jar:?]
              at net.minecraft.server.MinecraftServer.run(SourceFile:457) [minecraft_s
      erver.jar:?]
              at java.lang.Thread.run(Unknown Source) [?:1.8.0_77]
      

      Steps to reproduce (banned-players)

      1. Run a server
      2. /ban yourself
      3. Close server
      4. Edit the banned-players.json's expiration date to "unban" after 1 minute
      5. Start server again
      6. Wait that time and try to join

      Steps to reproduce (banned-ips)

      1. Run a server
      2. /ban-ip yourself
      3. Close server
      4. Edit the banned-ip.json's expiration date to "unban" after 1 minute
      5. Start server again
      6. Wait that time and try to join, you will receive an error
      7. Try joining again, you'll get in
      8. Close and start the server again
      9. Enter the server, and see the same message again

      Code analysis

      See this comment.

        1. banned-players.json.png
          banned-players.json.png
          60 kB
        2. img.png
          img.png
          6 kB
        3. it fails to work.png
          it fails to work.png
          176 kB

            Unassigned Unassigned
            jirauser71590 user-f2760 (Inactive)
            Votes:
            11 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: