From 840ffe968e487f7dedebfbe6dad928920bab300b Mon Sep 17 00:00:00 2001 From: BlackDex Date: Fri, 3 Nov 2023 13:04:34 +0100 Subject: [PATCH] Updated suggestions and crates - Addressed the suggestions - Updated Rocket to latest rc4 Also made the needed code changes - Updated all other crates Pinned `openssl` and `openssl-sys` --- src/api/admin.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/admin.rs b/src/api/admin.rs index e4a8d95fb6b..4df77748930 100644 --- a/src/api/admin.rs +++ b/src/api/admin.rs @@ -316,7 +316,7 @@ async fn test_smtp(data: Json, _token: AdminToken) -> EmptyResult { #[get("/logout")] fn logout(cookies: &CookieJar<'_>) -> Redirect { - cookies.remove(Cookie::build(COOKIE_NAME, "").path(admin_path()).finish()); + cookies.remove(Cookie::build(COOKIE_NAME).path(admin_path())); Redirect::to(admin_path()) } @@ -797,7 +797,7 @@ impl<'r> FromRequest<'r> for AdminToken { if decode_admin(access_token).is_err() { // Remove admin cookie - cookies.remove(Cookie::build(COOKIE_NAME, "").path(admin_path()).finish()); + cookies.remove(Cookie::build(COOKIE_NAME).path(admin_path())); error!("Invalid or expired admin JWT. IP: {}.", &ip.ip); return Outcome::Error((Status::Unauthorized, "Session expired")); }