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

Huge code error #14

Open
emanuelmustea opened this issue Apr 17, 2019 · 0 comments
Open

Huge code error #14

emanuelmustea opened this issue Apr 17, 2019 · 0 comments

Comments

@emanuelmustea
Copy link
Contributor

emanuelmustea commented Apr 17, 2019

if ( user.password !== password ) {

On the line #34 compareSync function returns either true or false.
On the line #36 the returned value is compared with the user password wich doesn't makes any sense because the user password will never be true.
So instead of if ( user.password !== password ) { it's better to use if ( password) { to check if given password is correct or not.

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

No branches or pull requests

1 participant