Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added userExist middleware #122

Merged
merged 4 commits into from
Jan 27, 2024
Merged

Conversation

mohitparmar1
Copy link
Contributor

@mohitparmar1 mohitparmar1 commented Jan 26, 2024

#77

Copy link

vercel bot commented Jan 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
doodle-collab ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 26, 2024 6:46pm

@ItsRoy69
Copy link
Collaborator

ItsRoy69 commented Jan 26, 2024

Kindly mention the issue number and resolve conflicts

router.route("/login").post(loginUser);
router.route("/register").get(getUser);
.post(registerLimiter, registerValidationRules, registerUser)
.get(userExists, getUser);

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
a database access
, but is not rate-limited.
.post(registerLimiter, registerValidationRules, registerUser)
.get(userExists, getUser);

router.route("/login").post(userExists, loginUser);

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
a database access
, but is not rate-limited.
const userExists = async (req, res, next) => {
const { email } = req.body;
try {
const userExist = User.findOne({ email });

Check failure

Code scanning / CodeQL

Database query built from user-controlled sources High

This query object depends on a
user-provided value
.
@ItsRoy69 ItsRoy69 merged commit d727ad8 into WikiPortal:main Jan 27, 2024
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants