From 569d60cb57a6774b6e2b8a55f13bb1563603dfc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Gonz=C3=A1lez?= <7822554+AlexTMjugador@users.noreply.github.com> Date: Wed, 25 Jun 2025 18:51:08 +0200 Subject: [PATCH] tweak(labrinth): return proper error message for invalid password change flows (#3839) --- apps/labrinth/src/routes/internal/flows.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/labrinth/src/routes/internal/flows.rs b/apps/labrinth/src/routes/internal/flows.rs index 23d8db903..53db62d09 100644 --- a/apps/labrinth/src/routes/internal/flows.rs +++ b/apps/labrinth/src/routes/internal/flows.rs @@ -2031,7 +2031,9 @@ pub async fn change_password( Some(user) } else { - None + return Err(ApiError::CustomAuthentication( + "The password change flow code is invalid or has expired. Did you copy it promptly and correctly?".to_string(), + )); } } else { None