From ea299312d036f657ffb2d628d53c80fcabeac72f Mon Sep 17 00:00:00 2001 From: Antoine Gersant Date: Sun, 28 Oct 2018 15:46:35 -0700 Subject: [PATCH] Fixed a bug where authentication yielded incorrect usernames --- src/rocket_api.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rocket_api.rs b/src/rocket_api.rs index 3b65d04..0bef85b 100644 --- a/src/rocket_api.rs +++ b/src/rocket_api.rs @@ -52,7 +52,7 @@ impl<'a, 'r> FromRequest<'a, 'r> for Auth { let mut cookies = request.guard::().unwrap(); match cookies.get_private(SESSION_FIELD_USERNAME) { Some(u) => Outcome::Success(Auth { - username: u.to_string(), + username: u.value().to_string(), }), _ => Outcome::Failure((Status::Forbidden, ())), }