From c128341f95ffc96b609e24b1d635a14b19ae46a8 Mon Sep 17 00:00:00 2001 From: Meleki Date: Mon, 2 Mar 2026 15:04:16 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20Passwort-=C3=84nderung=20bei=20falschem?= =?UTF-8?q?=20Passwort=20gibt=20403=20statt=20401=20zur=C3=BCck?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 401 triggerte den globalen Auth-Handler und redirectete zum Login-Screen. 403 (Forbidden) ist semantisch korrekt und zeigt die Fehlermeldung inline an. --- Endpoints/ProfileEndpoint.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Endpoints/ProfileEndpoint.cs b/Endpoints/ProfileEndpoint.cs index 0aeaf22..6a276c3 100644 --- a/Endpoints/ProfileEndpoint.cs +++ b/Endpoints/ProfileEndpoint.cs @@ -83,7 +83,7 @@ public static class ProfileEndpoint var user = await db.GetUser(userId); if (user == null || !auth.VerifyPassword(currentPassword, user.PasswordHash)) { - ctx.Response.StatusCode = 401; + ctx.Response.StatusCode = 403; await ctx.Response.WriteAsJsonAsync(new { error = "Aktuelles Passwort ist falsch" }); return; }