Fixed a bug where authentication yielded incorrect usernames
This commit is contained in:
parent
35514182aa
commit
ea299312d0
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ impl<'a, 'r> FromRequest<'a, 'r> for Auth {
|
||||||
let mut cookies = request.guard::<Cookies>().unwrap();
|
let mut cookies = request.guard::<Cookies>().unwrap();
|
||||||
match cookies.get_private(SESSION_FIELD_USERNAME) {
|
match cookies.get_private(SESSION_FIELD_USERNAME) {
|
||||||
Some(u) => Outcome::Success(Auth {
|
Some(u) => Outcome::Success(Auth {
|
||||||
username: u.to_string(),
|
username: u.value().to_string(),
|
||||||
}),
|
}),
|
||||||
_ => Outcome::Failure((Status::Forbidden, ())),
|
_ => Outcome::Failure((Status::Forbidden, ())),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue