DevLan-Cybersecurity / arvan

http://devlan.flazio.com
GNU General Public License v3.0
3 stars 1 forks source link

[BUG] Correct name check on PaperSpigot #19

Closed DevLan-Fargus closed 3 years ago

DevLan-Fargus commented 3 years ago

:round_pushpin: Description (REQUIRED)

What behaviour is observed:

After a player changed their premium username - FastLogin still forces an old username to be used. Also because of that - premium register/login is not working for that person and he has to log in manually

What behaviour is expected:

should recognize the change, update the database and not force the old username

Steps/models to reproduce:

Login onto the server before change, change the premium username, log in again

Server Log:

 [20:19:57] [FastLogin Pool Thread #1/INFO]: [FastLogin] Handling player xMandzio
 [20:19:58] [FastLogin Pool Thread #1/INFO]: [FastLogin] GameProfile Profile{id=4e829203-7bb1-49ca-8f2a-5a03c099c3d1, name='xMandzio'} changed it's username
 [20:19:58] [FastLogin Pool Thread #2/INFO]: [FastLogin] Profile xMandzio has a verified premium account: Verification{id=4e829203-7bb1-49ca-8f2a-5a03c099c3d1, name='xMandzio', properties=[SkinProperty{value='longbase64'}]}
 [20:19:58] [User Authenticator #49/INFO]: UUID of player MinecraftPapryka is 4e829203-7bb1-49ca-8f2a-5a03c099c3d1
 [20:19:59] [Server thread/INFO]: [+] MinecraftPapryka
 [20:19:59] [Server thread/INFO]: MinecraftPapryka[/IP:57132] logged in with entity id 124550 at ([world]1567.6572031527865, 62.073264667783306, -584.5553397955687)
 [20:19:59] [Craft Scheduler Thread - 1397/WARN]: [FastLogin] Player username MinecraftPapryka is not matching session xMandzio
 [20:19:59] [Craft Scheduler Thread - 1387/INFO]: [SkinsRestorer] Unsupported player format.. removing (minecraftpapryka).
 [20:20:05] [Craft Scheduler Thread - 1397/INFO]: [AuthMe] MinecraftPapryka logged in IP
 [20:20:12] [Async Chat Thread - #20/INFO]: MinecraftPapryka: test

Configuration:

 anti-bot:
   connections: 200
   expire: 5
 autoRegister: true
 secondAttemptCracked: false
 switchMode: false
 premiumUuid: true
 nameChangeCheck: true
 forwardSkin: true
 premium-warning: true
 ip-addresses: []
 mojang-request-limit: 400
 auto-register-unknown: false
 autoLogin: true

:compass: Possible solution

https://github.com/games647/FastLogin/pull/459

🧭 Solution adopted

https://github.com/games647/FastLogin/commit/1ab346d067798239b77e2d506f3f8d21c734e8f3


DevLan-Fargus commented 3 years ago

Fixed

https://ci.codemc.io/job/Games647/job/FastLogin/