From a611910d3f1a6aabce5a4ca1b2802428f2790052 Mon Sep 17 00:00:00 2001 From: harshitg927 Date: Thu, 9 Jan 2025 21:51:33 +0530 Subject: [PATCH] fix: trim whitespace from password field during login validation --- frontend/src/components/Login.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/components/Login.js b/frontend/src/components/Login.js index 1b29c76c71..c942a8cafe 100644 --- a/frontend/src/components/Login.js +++ b/frontend/src/components/Login.js @@ -166,6 +166,9 @@ function Login(props) { password: "", }} onSubmit={(values) => { + // trimming password before login validation + values.password = values.password.trim(); + fetch(config.serverBaseUrl + "/LoginPage", { //includes the browser sessionId in the Header for Authentication on the backend server credentials: "include",