fix: incorrect nex password length
This commit is contained in:
parent
5e18940a00
commit
68dc89532c
3 changed files with 11 additions and 0 deletions
|
|
@ -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))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue