ClassiCube / MCGalaxy

A Minecraft Classic / ClassiCube server software
GNU General Public License v3.0
160 stars 76 forks source link

Player names matching isn't case sensitive #766

Open ActionRetro opened 1 year ago

ActionRetro commented 1 year ago

If I register my name as ActionRetro, and another user takes ACTIONRETRO, I can't ban ACTIONRETRO even by IP. The ban feature thinks that ActionRetro and ACTIONRETRO are the same.

image image

Additionally, it seems I cannot ban "actionr" - I get "You cannot ban yourself"

UnknownShadow200 commented 1 year ago

In truth, database name lookup when logging in should have been case insensitive from day one to avoid this sort of issue altogether, as most of the rest of MCGalaxy treats player names as case insensitive

But unfortunately, there are already existing servers out there that mistakenly have multiple entries for the same name but with differing case - and changing general name lookup to be case sensitive would cause issues for them

So I'll compromise by changing name lookup on login to be case insensitive when running on servers with name verification disabled

(but note that running a publicly accessible server with name verification disabled isn't recommended and can have other issues - see #673 for instance)

UnknownShadow200 commented 12 months ago

1755ec2a56df13a502b2ce41ee172b7d8ccbc491 (part of 1.9.4.9) should prevent being able to have multiple users with the same name but differing case, if the server is running without name verification