From 250f49fee266bf4c3fb92d457cea7edd8496fe30 Mon Sep 17 00:00:00 2001 From: pancakes Date: Mon, 24 Mar 2025 17:00:53 +1000 Subject: [PATCH] [backend/api] Improve invalid old password message --- Iceshrimp.Backend/Controllers/Web/AuthController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Iceshrimp.Backend/Controllers/Web/AuthController.cs b/Iceshrimp.Backend/Controllers/Web/AuthController.cs index ce080462..08fb93f6 100644 --- a/Iceshrimp.Backend/Controllers/Web/AuthController.cs +++ b/Iceshrimp.Backend/Controllers/Web/AuthController.cs @@ -140,7 +140,7 @@ public class AuthController(DatabaseContext db, UserService userSvc, UserRendere var settings = await db.UserSettings.FirstOrDefaultAsync(p => p.User == user); if (settings is not { Password: not null }) throw new Exception("settings?.Password was null"); if (!AuthHelpers.ComparePassword(request.OldPassword, settings.Password)) - throw GracefulException.BadRequest("old_password is invalid"); + throw GracefulException.BadRequest("Old password is incorrect"); if (request.NewPassword.Length < 8) throw GracefulException.BadRequest("Password must be at least 8 characters long");