We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b27e84 commit 56d0ee0Copy full SHA for 56d0ee0
1 file changed
server/controllers/user.controller/signup.ts
@@ -98,7 +98,6 @@ export const duplicateUserCheck: RequestHandler<
98
const checkType = req.query.check_type;
99
const allowedCheckTypes = ['email', 'username'] as const;
100
101
- // Validate check_type to prevent prototype pollution
102
if (
103
!checkType ||
104
!allowedCheckTypes.includes(checkType as 'email' | 'username')
@@ -110,7 +109,6 @@ export const duplicateUserCheck: RequestHandler<
110
109
111
const value = req.query[checkType];
112
113
- // Validate that the corresponding value exists
114
if (!value || typeof value !== 'string' || value.trim().length === 0) {
115
return res.status(400).json({
116
error: `Missing or invalid ${checkType} value.`
0 commit comments