From 9f257610141f4a14d6f33ab45fa418f71ca1a83e Mon Sep 17 00:00:00 2001 From: Mauro D Date: Sun, 21 Jan 2024 08:03:21 -0300 Subject: [PATCH] OAuth: redirect using a 301 instead of a 307 code --- crates/jmap/src/auth/oauth/user_code.rs | 2 +- crates/smtp/src/core/eval.rs | 20 ++------------------ 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/crates/jmap/src/auth/oauth/user_code.rs b/crates/jmap/src/auth/oauth/user_code.rs index 9403ecc6..d18912e2 100644 --- a/crates/jmap/src/auth/oauth/user_code.rs +++ b/crates/jmap/src/auth/oauth/user_code.rs @@ -219,7 +219,7 @@ impl JMAP { HtmlResponse::new(response).into_http_response() } else { hyper::Response::builder() - .status(StatusCode::TEMPORARY_REDIRECT) + .status(StatusCode::MOVED_PERMANENTLY) .header(header::LOCATION, redirect_link) .body( Full::new(Bytes::from(Vec::::new())) diff --git a/crates/smtp/src/core/eval.rs b/crates/smtp/src/core/eval.rs index d7f4756e..2403ec37 100644 --- a/crates/smtp/src/core/eval.rs +++ b/crates/smtp/src/core/eval.rs @@ -75,15 +75,7 @@ impl SMTP { match result.try_into() { Ok(value) => Some(value), - Err(_) => { - tracing::warn!( - context = "eval_if", - event = "error", - property = if_block.key, - "Failed to convert value." - ); - None - } + Err(_) => None, } } @@ -112,15 +104,7 @@ impl SMTP { match result.try_into() { Ok(value) => Some(value), - Err(_) => { - tracing::warn!( - context = "eval_expr", - event = "error", - property = expr_id, - "Failed to convert value." - ); - None - } + Err(_) => None, } }