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

Server log does not use the string representation of a player's GameProfile on a disconnect during encryption

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 1.13, Minecraft 1.13.2, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w02a, 1.16.4, 1.18.2, 22w15a, 1.19.3, 23w04a, 1.20.4, 23w51b
    • Community Consensus
    • Dedicated Server
    • Low
    • Platform

      When joining and cancel joining while the server is loading the world the disconnect message is not the same as when.

      How to reproduce:
      1. Start server
      while world loads:
      2. join
      3. wait until it shows encrypting
      4. press cancel
      5. wait until the world loaded
      6. look in the server terminal

      Expected:
      The server logs a disconnect like it would be logged when the world is loaded:

      Sertonix lost connection: Disconnect

      Observed:
      The server logs a lot more data instead of just the username:

      com.mojang.authlib.GameProfile@3af7900[id=c79d29c6-0d05-435c-b742-c1cdd4ab191d,name=Sertonix,properties={textures=[com.mojang.authlib.properties.Property@38b94fa8]},legacy=false] (/127.0.0.1:52010) lost connection: Disconnected

      If you cancel while connecting or logging in some data hasn't loaded jet:

      com.mojang.authlib.GameProfile@1154b36a[id=<null>,name=Sertonix,properties={},legacy=false] (/127.0.0.1:52087) lost connection: Disconnected

      Cause & fix
      The reason this happens is because there are two different functions that can log a disconnect. The on disconnect function in the server login handler could be changed to only print the user name instead.

            Unassigned Unassigned
            Sertonix Sertonix
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              CHK: