fix: incorrect nex password length

This commit is contained in:
DJMrTV 2025-05-29 22:17:51 +02:00
commit 68dc89532c
3 changed files with 11 additions and 0 deletions

View file

@ -230,6 +230,11 @@ impl<'r, const FORCE_BEARER_AUTH: bool> FromRequest<'r> for Auth<FORCE_BEARER_AU
let Some(user) = user else {
return Outcome::Error((Status::BadRequest, INVALID_TOKEN_ERRORS));
};
let user = User{
nex_password: format!("{:a>16}", user.nex_password),
..user
};
Outcome::Success(Self(user))
}

View file

@ -126,6 +126,8 @@ impl Query {
return None;
}
};
let nex_password = format!("{:a>16}",user.nex_password);
Some(UserInfo {
username: user.username,
@ -149,6 +151,8 @@ impl Query {
.await
.ok()?;
let nex_password = format!("{:a>16}",user.nex_password);
Some(UserInfo {
username: user.username,
account_level: user.account_level,

View file

@ -101,6 +101,8 @@ pub async fn get_nex_token(pool: &State<Pool>, auth: Auth<true>, game_server_id:
let host = host.ip();
Ok(
Xml(
NexToken{