mirror of
https://github.com/MewoLab/AquaDX.git
synced 2025-10-25 20:12:39 +00:00
[F] Fix username decoding
This commit is contained in:
parent
40a65b5e13
commit
d2cf16d046
@ -45,6 +45,9 @@ class UpsertUserAllHandler(
|
||||
card = userData?.card ?: cardService.getCardByExtId(userId).orElseThrow()
|
||||
isNetMember = 1
|
||||
|
||||
// Decode Username
|
||||
userName = String(userName.toByteArray(Charsets.ISO_8859_1), Charsets.UTF_8)
|
||||
|
||||
// Verify user name
|
||||
if (userName.isBlank() || userName.length > 8 || !userName.all { it in USERNAME_CHARS })
|
||||
400 - "Invalid username"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user