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