SE701-T5 / Backend

Heroku deployed Node.js backend server developed by Team-5 for the UniForum project associated with the University of Auckland SOFTENG 701 course
https://uni-forum.herokuapp.com/
MIT License
2 stars 18 forks source link

Implementing password hashing #69

Closed kimslor closed 2 years ago

kimslor commented 2 years ago

Description

A password hashing method was created in the user models. This method has been used to hash the plain text password provided by the user during account creation. Now the hashedPassword will be stored in the DB and not the plaintext password. This hashPassword() method should be used for password verification, such as login.

salted-md5 was used for the hashing of the plaintext password.

Related Issue

Solves https://github.com/SE701-T5/Backend/issues/40

Type of change

How Has This Been Tested?

A unit test has been made for this method when a forum user is created and the hashed password stored in the test database is compared with a hashed password using the same plaintext and hashing method.

Checklist:

For more information, refer to the Contributing Guidelines and Code of Conduct links at the bottom of this page.

R055A commented 2 years ago

41 tests failed! I have rerun the CI as it is very likley the CI tests failed because of commit(s) made before testing from prior commit(s) has completed causing a clash between test suites executing and accessing the same resources in parallel. I will wait until the final commit has been made and all CI tests are passing before I review again.

R055A commented 2 years ago

41 tests failed! It is likely because of commit(s) made before testing from prior commit(s) has completed causing a clash between test suites executing and accessing the same resources in parallel. I will wait until the final commit has been made and all CI tests are passing before I review again.

Now 31 tests are failing. Let me know when this is ready for review again, please.

R055A commented 2 years ago

I don't know how it happened but I seem to have mistakenly labelled this already merged pull request as invalid. It is not invalid. I have removed the label and moved the pull request back the Done column. I must have had too many tabs open at once.