From 35c662695c4593f132f7bd383e99688fbf3944e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Thu, 12 Nov 2026 18:29:22 +0100 Subject: [PATCH] Escape the email in the client version log line On a first SSO login the email comes from the identity provider and isn't validated yet, so a newline in it could add a line to the log. --- src/api/identity.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api/identity.rs b/src/api/identity.rs index bb1b97c4..66e847f8 100644 --- a/src/api/identity.rs +++ b/src/api/identity.rs @@ -533,7 +533,8 @@ fn check_client_version(user: &User, client_header: &ClientHeaders) -> EmptyResu return Ok(()); }; Err(crate::error::Error::from(( - format!("IP: {}. Username: {}. {error}", client_header.ip.ip, user.email), + // Escaped: on a first SSO login the email comes from the provider and isn't validated yet + format!("IP: {}. Username: {}. {error}", client_header.ip.ip, user.email.escape_debug()), json!({ "error": error, "error_description": description,