mateimarica / mateimarica.dev

Personal website with an Express.js backend.
https://mateimarica.dev
MIT License
0 stars 0 forks source link

[files] Server doesn't return response when username or password invalid #31

Closed mateimarica closed 2 months ago

mateimarica commented 2 months ago

In the login logic, there is a guard clause in that skips checking the database if the given username or password don't pass validations (eg: password length < 6).

res.status should be res.sendStatus; the former leaves the client hanging without a response.

Also check for other occurrences of this mistake.