From f6d194f0c97f48d45c4ddcef579be54ad0fb47cb Mon Sep 17 00:00:00 2001 From: Stephan <57194608+stephan418@users.noreply.github.com> Date: Sat, 23 Apr 2022 14:01:45 +0200 Subject: [PATCH] Fix: The server should always return 403 on failed login --- src/Controllers/admin_auth.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controllers/admin_auth.controller.ts b/src/Controllers/admin_auth.controller.ts index 33ce37b..760e85d 100644 --- a/src/Controllers/admin_auth.controller.ts +++ b/src/Controllers/admin_auth.controller.ts @@ -50,7 +50,7 @@ export const authenticateUser = async (req: Request<{}, {}, AuthenticateUserBody // with only the username if (!user) { - return res.status(404).json({ + return res.status(403).json({ type: "error", payload: { message: `The provided credentials are not valid`,