diff --git a/NoSQL Injection/mongodb.js b/NoSQL Injection/mongodb.js index db57c8f7..3175ac80 100644 --- a/NoSQL Injection/mongodb.js +++ b/NoSQL Injection/mongodb.js @@ -62,7 +62,7 @@ router.post('/customers/login', async (req, res) => { const db = client.db(config.MONGODB_DB_NAME); const customers = db.collection("customers") - let myobj = { email: req.body.email, password: req.body.password }; + let myobj = { email: { $eq: req.body.email }, password: { $eq: req.body.password } }; customers.findOne(myobj, function (err, result) { if (err) throw err; db.close();