Skip to content

Commit f227fb7

Browse files
author
Marius Cramer
committed
Support passwords in login that are crypted with crypt-SHA256
1 parent 1bcc716 commit f227fb7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

interface/web/login/index.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,13 @@ public function render() {
197197
//* The password is crypt-md5 encrypted
198198
$salt = '$1$'.substr($saved_password, 3, 8).'$';
199199

200+
if(crypt(stripslashes($passwort), $salt) != $saved_password) {
201+
$user = false;
202+
}
203+
} elseif(substr($saved_password, 0, 3) == '$5$') {
204+
//* The password is crypt-md5 encrypted
205+
$salt = '$5$'.substr($saved_password, 3, 16).'$';
206+
200207
if(crypt(stripslashes($passwort), $salt) != $saved_password) {
201208
$user = false;
202209
}

0 commit comments

Comments
 (0)