From ae2b87f03fade0b8aa0d13ab7e8a3c4a1bfcf68c Mon Sep 17 00:00:00 2001 From: Ginger Date: Sat, 7 Mar 2026 12:12:09 -0500 Subject: [PATCH] fix: Fix M_NOT_FOUND for users with no origin set --- src/service/password_reset/mod.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/service/password_reset/mod.rs b/src/service/password_reset/mod.rs index 85903c9c..52636b19 100644 --- a/src/service/password_reset/mod.rs +++ b/src/service/password_reset/mod.rs @@ -58,7 +58,14 @@ impl Service { return Err!("Cannot issue a password reset token for the server user"); } - if self.services.users.origin(&user_id).await? != "password" { + if self + .services + .users + .origin(&user_id) + .await + .unwrap_or_else(|_| "password".to_owned()) + != "password" + { return Err!("Cannot issue a password reset token for non-internal user {user_id}"); }