From 8dd424381c12a65533dd7fc32e84d09196f1e108 Mon Sep 17 00:00:00 2001
From: Jaime Perez Crespo <jaime.perez@uninett.no>
Date: Thu, 16 Apr 2015 11:51:32 +0200
Subject: [PATCH] Use whitehat101/apr1-md5 to verify apache MD5 passwords.

---
 modules/authcrypt/lib/Auth/Source/Htpasswd.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/authcrypt/lib/Auth/Source/Htpasswd.php b/modules/authcrypt/lib/Auth/Source/Htpasswd.php
index b9db55c3e..fb116ec10 100644
--- a/modules/authcrypt/lib/Auth/Source/Htpasswd.php
+++ b/modules/authcrypt/lib/Auth/Source/Htpasswd.php
@@ -6,6 +6,9 @@
  * @author Dyonisius (Dick) Visser, TERENA.
  * @package simpleSAMLphp
  */
+
+use WhiteHat101\Crypt\APR1_MD5;
+
 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
 				}
 
 				// Apache's custom MD5
-				if(SimpleSAML_Utils_Crypto::apr1Md5Valid($crypted, $password)) {
+				if(APR1_MD5::check($crypted, $password)) {
 					SimpleSAML_Logger::debug('User '. $username . ' authenticated successfully');
 					return $attributes;
 				}
-- 
GitLab