mirror of
https://github.com/optim-enterprises-bv/Mailu.git
synced 2025-10-30 17:47:55 +00:00
Merge #3653
3653: Don't check empty passwords against HIBP (backport #3650) r=nextgens a=mergify[bot] ## What type of PR? bug-fix ## What does this PR do? Don't check empty passwords against HIBP; Apparently some password managers will trigger a race condition otherwise ### Related issue(s) - closes #3633 ## Prerequisites Before we can consider review and merge, please make sure the following list is done and checked. If an entry in not applicable, you can check it or remove it from the list. - [ ] In case of feature or enhancement: documentation updated accordingly - [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file. <hr>This is an automatic backport of pull request #3650 done by [Mergify](https://mergify.com). Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
This commit is contained in:
@@ -21,6 +21,9 @@ function sha1(string) {
|
||||
}
|
||||
|
||||
function hibpCheck(pwd) {
|
||||
if (pwd === null || pwd === undefined || pwd.length === 0) {
|
||||
return;
|
||||
}
|
||||
// We hash the pwd first
|
||||
sha1(pwd).then(function(hash){
|
||||
// We send the first 5 chars of the hash to hibp's API
|
||||
|
||||
1
towncrier/newsfragments/3650.bugfix
Normal file
1
towncrier/newsfragments/3650.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Don't check empty passwords against HIBP
|
||||
Reference in New Issue
Block a user