From f227fb72b50e8580cd5ec1f539ec5749de6dd48c Mon Sep 17 00:00:00 2001 From: Marius Cramer <m.cramer@pixcept.de> Date: Thu, 14 Aug 2014 04:31:42 -0400 Subject: [PATCH] Support passwords in login that are crypted with crypt-SHA256 --- interface/web/login/index.php | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/interface/web/login/index.php b/interface/web/login/index.php index 951dbaf..8043280 100644 --- a/interface/web/login/index.php +++ b/interface/web/login/index.php @@ -200,6 +200,13 @@ 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; + } } else { //* The password is md5 encrypted -- Gitblit v1.9.1