1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-04 10:24:41 +02:00

Don't check empty passwords against HIBP

This commit is contained in:
Florent Daigniere 2024-11-17 14:42:23 +01:00
parent e713fb6723
commit f1c5ac5b14
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1 @@
Don't check empty passwords against HIBP