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

test/20241118_1034 #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

test/20241118_1034 #14

wants to merge 1 commit into from

Conversation

ferreiratiago
Copy link

No description provided.

Copy link

snyk-io bot commented Nov 18, 2024

Snyk checks have failed. 3 issues have been found so far.

Icon Severity Issues
Critical 0
High 2
Medium 1
Low 0

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

code/snyk check is complete. 3 issues have been found. (View Details)

@@ -35,7 +35,26 @@ exports.index = function (req, res, next) {
};

exports.loginHandler = function (req, res, next) {
// TODO: Implement
if (validator.isEmail(req.body.username)) {
User.find(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  NoSQL Injection

Unsanitized input from the HTTP request body flows into find, where it is used in an NoSQL query. This may result in an NoSQL Injection vulnerability.

CWE-943 | Priority score 813 | Line 39
Data flow: 6 steps

Step 1

username: req.body.username,

Step 2 routes/index.js#41

Step 3 routes/index.js#41

Step 4 routes/index.js#41

Step 5 routes/index.js#40

Step 6

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.

1 participant