From 676a7ea81c4e0b1afa3cc8cd848136ffd2c58bc4 Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Mon, 28 Aug 2017 01:55:48 +0200 Subject: [PATCH] Patch already applied (6a3eb66d19333f1d6d174d6fcdd672ab7fba50be) --- modules/phpass/user_load.D6.patch | 44 ------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 modules/phpass/user_load.D6.patch diff --git a/modules/phpass/user_load.D6.patch b/modules/phpass/user_load.D6.patch deleted file mode 100644 index 38fc910..0000000 --- a/modules/phpass/user_load.D6.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/modules/user/user.module b/modules/user/user.module -index 625a00c..88ffbdb 100644 ---- a/modules/user/user.module -+++ b/modules/user/user.module -@@ -7,6 +7,8 @@ - - define('USERNAME_MAX_LENGTH', 60); - define('EMAIL_MAX_LENGTH', 64); -+// Extra define to indicate user_load() is patched. -+define('USER_LOAD_PHPASS_PATCHED', 1); - - /** - * Invokes hook_user() in every module. -@@ -162,14 +164,14 @@ function user_load($user_info = array()) { - return FALSE; - } - -+ $password_check_needed = FALSE; - foreach ($user_info as $key => $value) { - if ($key == 'uid' || $key == 'status') { - $query[] = "$key = %d"; - $params[] = $value; - } - else if ($key == 'pass') { -- $query[] = "pass = '%s'"; -- $params[] = md5($value); -+ $password_check_needed = TRUE; - } - else { - $query[]= "LOWER($key) = LOWER('%s')"; -@@ -181,6 +183,13 @@ function user_load($user_info = array()) { - if ($user = db_fetch_object($result)) { - $user = drupal_unpack($user); - -+ if ($password_check_needed) { -+ module_load_include('inc', 'phpass', 'password'); -+ if (!user_check_password($user_info['pass'], $user)) { -+ return FALSE; -+ } -+ } -+ - $user->roles = array(); - if ($user->uid) { - $user->roles[DRUPAL_AUTHENTICATED_RID] = 'authenticated user';