public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
[Web] Implement MD5-CRYPT verification, fixes #1665
5db40bf6
data/web/inc/functions.inc.php | 6 ++++++
1 file changed, 6 insertions(+)
Diff
diff --git a/data/web/inc/functions.inc.php b/data/web/inc/functions.inc.php
index 6804fec0..94eada4f 100644
--- a/data/web/inc/functions.inc.php
+++ b/data/web/inc/functions.inc.php
@@ -266,6 +266,12 @@ function verify_hash($hash, $password) {
return true;
}
}
+ elseif (preg_match('/^{MD5-CRYPT}/i', $hash)) {
+ $hash = preg_replace('/^{MD5-CRYPT}/i', '', $hash);
+ if (password_verify($password, $hash)) {
+ return true;
+ }
+ }
return false;
}
function check_login($user, $pass) {