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

fix: update old password hash (deprecated token strategy) #1191

Merged
merged 9 commits into from
May 8, 2023

Conversation

marrouchi
Copy link
Contributor

@marrouchi marrouchi commented Apr 18, 2023

Motivation

Updating the password does not update the old hash value in passport collection.

How to reproduce :

  • Open OpenHIM (fresh install)
  • First login with [email protected] / openhim-password
  • Reset password (BUG : passwordHash stays the same)
  • Run the openhim mapping mediator -> fails to authenticate.

@marrouchi marrouchi requested a review from nour-borgi April 18, 2023 14:54
@codecov
Copy link

codecov bot commented Apr 18, 2023

Codecov Report

Merging #1191 (f259598) into master (6bd1451) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head f259598 differs from pull request most recent head a46c29b. Consider uploading reports for the commit a46c29b to get more accurate results

@@           Coverage Diff           @@
##           master    #1191   +/-   ##
=======================================
  Coverage   86.54%   86.54%           
=======================================
  Files          85       85           
  Lines        5798     5806    +8     
=======================================
+ Hits         5018     5025    +7     
- Misses        780      781    +1     
Impacted Files Coverage Δ
src/model/users.js 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@marrouchi
Copy link
Contributor Author

@nour-borgi Please can you test this locally before approving ? Might be good to refactor and add unit tests ;)

@nour-borgi nour-borgi marked this pull request as draft April 28, 2023 16:20
src/model/users.js Outdated Show resolved Hide resolved
@nour-borgi nour-borgi marked this pull request as ready for review May 5, 2023 14:30
@nour-borgi nour-borgi merged commit b68dce2 into master May 8, 2023
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

Successfully merging this pull request may close these issues.

3 participants