Skip to content

Commit

Permalink
Security issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
UO287687 committed Apr 28, 2024
1 parent 3721a10 commit 5269873
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion users/authservice/auth-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ app.post('/login', async (req, res) => {
const { username, password } = req.body;

// Find the user by username in the database
const user = await User.findOne({ username });
const user = await User.findOne({ username:username.toString() });

// Check if the user exists and verify the password
if (user && await bcrypt.compare(password, user.password)) {
Expand Down

0 comments on commit 5269873

Please sign in to comment.