Skip to content
Snippets Groups Projects
Commit 8dd42438 authored by Jaime Perez Crespo's avatar Jaime Perez Crespo
Browse files

Use whitehat101/apr1-md5 to verify apache MD5 passwords.

parent 4738e095
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
* @author Dyonisius (Dick) Visser, TERENA. * @author Dyonisius (Dick) Visser, TERENA.
* @package simpleSAMLphp * @package simpleSAMLphp
*/ */
use WhiteHat101\Crypt\APR1_MD5;
class sspmod_authcrypt_Auth_Source_Htpasswd extends sspmod_core_Auth_UserPassBase { class sspmod_authcrypt_Auth_Source_Htpasswd extends sspmod_core_Auth_UserPassBase {
...@@ -77,7 +80,7 @@ class sspmod_authcrypt_Auth_Source_Htpasswd extends sspmod_core_Auth_UserPassBas ...@@ -77,7 +80,7 @@ class sspmod_authcrypt_Auth_Source_Htpasswd extends sspmod_core_Auth_UserPassBas
} }
// Apache's custom MD5 // Apache's custom MD5
if(SimpleSAML_Utils_Crypto::apr1Md5Valid($crypted, $password)) { if(APR1_MD5::check($crypted, $password)) {
SimpleSAML_Logger::debug('User '. $username . ' authenticated successfully'); SimpleSAML_Logger::debug('User '. $username . ' authenticated successfully');
return $attributes; return $attributes;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment