From f227fb72b50e8580cd5ec1f539ec5749de6dd48c Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Thu, 14 Aug 2014 10:31:42 +0200 Subject: [PATCH] Support passwords in login that are crypted with crypt-SHA256 --- interface/web/login/index.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/interface/web/login/index.php b/interface/web/login/index.php index 951dbaf29..8043280ce 100644 --- a/interface/web/login/index.php +++ b/interface/web/login/index.php @@ -197,6 +197,13 @@ class login_index { //* The password is crypt-md5 encrypted $salt = '$1$'.substr($saved_password, 3, 8).'$'; + if(crypt(stripslashes($passwort), $salt) != $saved_password) { + $user = false; + } + } elseif(substr($saved_password, 0, 3) == '$5$') { + //* The password is crypt-md5 encrypted + $salt = '$5$'.substr($saved_password, 3, 16).'$'; + if(crypt(stripslashes($passwort), $salt) != $saved_password) { $user = false; } -- GitLab