userfrosting / UserFrosting

Modern PHP user login and management framework
https://www.userfrosting.com
Other
1.64k stars 366 forks source link

generateRandomToken improvement. #1176

Open michaellrowley opened 3 years ago

michaellrowley commented 3 years ago

The MD5 call altogether has been switched out for the hexadecimal representation of 16 CSRNG-generated bytes (the same amount at MD5 produces). See this.

codecov[bot] commented 3 years ago

Codecov Report

Merging #1176 (3aff283) into hotfix (5b50529) will decrease coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             hotfix    #1176      +/-   ##
============================================
- Coverage     70.68%   70.68%   -0.01%     
  Complexity     1984     1984              
============================================
  Files           173      173              
  Lines          6911     6910       -1     
============================================
- Hits           4885     4884       -1     
  Misses         2026     2026              
Impacted Files Coverage Δ
...rinkles/account/src/Repository/TokenRepository.php 62.68% <100.00%> (ø)
app/sprinkles/core/src/Util/Captcha.php 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5b50529...3aff283. Read the comment docs.

lcharette commented 3 years ago

N.B.: This will need to be properly (manually) tested to make sure the existing token (if any) are not impacted and Captcha still properly working.