Skip to content

[Bug]: Duplicate passwordAttemptLimiter declaration in rateLimiter.js crashes server #215

Description

@Git-Shubham14

Description

server/middleware/rateLimiter.js declares passwordAttemptLimiter twice using export const, causing a SyntaxError: Identifier 'passwordAttemptLimiter' has already been declared crash on server startup.

Error

SyntaxError: Identifier 'passwordAttemptLimiter' has already been declared
at compileSourceTextModule (node:internal/modules/esm/utils:346:16)

File

server/middleware/rateLimiter.js

Lines

  • Line 45: export const passwordAttemptLimiter = rateLimit({...})
  • Line 57: export const passwordAttemptLimiter = rateLimit({...})

Expected Behaviour

Server should start without errors.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions