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 {
|
let Some(user) = user else {
|
||||||
return Outcome::Error((Status::BadRequest, INVALID_TOKEN_ERRORS));
|
return Outcome::Error((Status::BadRequest, INVALID_TOKEN_ERRORS));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let user = User{
|
||||||
|
nex_password: format!("{:a>16}", user.nex_password),
|
||||||
|
..user
|
||||||
|
};
|
||||||
|
|
||||||
Outcome::Success(Self(user))
|
Outcome::Success(Self(user))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,8 @@ impl Query {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let nex_password = format!("{:a>16}",user.nex_password);
|
||||||
|
|
||||||
Some(UserInfo {
|
Some(UserInfo {
|
||||||
username: user.username,
|
username: user.username,
|
||||||
|
|
@ -149,6 +151,8 @@ impl Query {
|
||||||
.await
|
.await
|
||||||
.ok()?;
|
.ok()?;
|
||||||
|
|
||||||
|
let nex_password = format!("{:a>16}",user.nex_password);
|
||||||
|
|
||||||
Some(UserInfo {
|
Some(UserInfo {
|
||||||
username: user.username,
|
username: user.username,
|
||||||
account_level: user.account_level,
|
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();
|
let host = host.ip();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Ok(
|
Ok(
|
||||||
Xml(
|
Xml(
|
||||||
NexToken{
|
NexToken{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue