From 954d38d5718611f46821856cf3616cc6cb535c11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Sep 2026 16:46:03 +0000 Subject: [PATCH 1/3] chore(deps): bump qs from 6.15.3 to 6.16.0 in /Backend Bumps [qs](https://github.com/ljharb/qs) from 6.15.3 to 6.16.0. - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](https://github.com/ljharb/qs/compare/v6.15.3...v6.16.0) --- updated-dependencies: - dependency-name: qs dependency-version: 6.16.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Backend/package-lock.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Backend/package-lock.json b/Backend/package-lock.json index a24142f..1a74e2b 100644 --- a/Backend/package-lock.json +++ b/Backend/package-lock.json @@ -23,7 +23,6 @@ "jsonwebtoken": "^9.0.3", "mongoose": "^9.7.2", "morgan": "^1.11.0", - "ms": "^2.1.3", "multer": "^2.2.0", "nodemailer": "^9.0.1", "qrcode": "^1.5.4", @@ -2531,9 +2530,9 @@ } }, "node_modules/qs": { - "version": "6.15.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz", - "integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==", + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.16.0.tgz", + "integrity": "sha512-h6fhOIaRrID2CbEY2fqs+7t+UXZo+MLAnU5gRIq85uFtdiUPCdsApMlHhXogKVM4HM2DVbIjGNTTYH2OcmP1vA==", "license": "BSD-3-Clause", "dependencies": { "es-define-property": "^1.0.1", From 54620945eb70b589b376434bc192fa3f01228ea0 Mon Sep 17 00:00:00 2001 From: Tushar Saini Date: Wed, 2 Sep 2026 22:33:31 +0530 Subject: [PATCH 2/3] Potential fix for code scanning alert no. 58: Database query built from user-controlled sources Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- Backend/src/controllers/registration.controller.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Backend/src/controllers/registration.controller.js b/Backend/src/controllers/registration.controller.js index e44ef75..76fef39 100644 --- a/Backend/src/controllers/registration.controller.js +++ b/Backend/src/controllers/registration.controller.js @@ -271,9 +271,13 @@ const addManualRegistration = asyncHandler(async (req, res) => { throw new ApiError(400, 'All fields are required'); } + if (typeof studentId !== 'string') { + throw new ApiError(400, 'Invalid student ID'); + } + // Check if studentId already exists (excluding REJECTED) const existingRegistration = await StudentRegistration.findOne({ - studentId, + studentId: { $eq: studentId }, status: { $in: ['PENDING', 'APPROVED'] }, }); if (existingRegistration) { From 18fff0bdaaf467be93f5974f8c9e1dd84c384f54 Mon Sep 17 00:00:00 2001 From: Tushar Saini Date: Wed, 2 Sep 2026 22:36:43 +0530 Subject: [PATCH 3/3] Remove studentId type validation in registration Removed validation for studentId type in registration. --- Backend/src/controllers/registration.controller.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Backend/src/controllers/registration.controller.js b/Backend/src/controllers/registration.controller.js index 76fef39..4356177 100644 --- a/Backend/src/controllers/registration.controller.js +++ b/Backend/src/controllers/registration.controller.js @@ -271,10 +271,6 @@ const addManualRegistration = asyncHandler(async (req, res) => { throw new ApiError(400, 'All fields are required'); } - if (typeof studentId !== 'string') { - throw new ApiError(400, 'Invalid student ID'); - } - // Check if studentId already exists (excluding REJECTED) const existingRegistration = await StudentRegistration.findOne({ studentId: { $eq: studentId },