By David_Rothstein on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
6.x, 7.x
Introduced in version:
6.35, 7.35
Issue links:
Description:
The user_pass_rehash() function in Drupal 6 and 7 is used for generating time-dependent per-user links, for example one-time login links.
In Drupal 6.35 and Drupal 7.35, a new parameter was added to this function to fix security issues (see SA-CORE-2015-001); the user account ID should now be passed in.
Before:
$timestamp = REQUEST_TIME; // In Drupal 6, use time() instead.
$account = user_load($uid);
$hash = user_pass_rehash($account->pass, $timestamp, $account->login);
After:
$timestamp = REQUEST_TIME; // In Drupal 6, use time() instead.
$account = user_load($uid);
$hash = user_pass_rehash($account->pass, $timestamp, $account->login, $account->uid);
If code is not updated for this change, Drupal will generate a PHP warning every time it is called. For backwards compatibility, the generated hash will still work correctly when it is possible to securely do so; however on some sites and in some situations the hashes will not work correctly until the code has been updated to pass in the user ID.
Impacts:
Module developers
Comments
problem width i18n
Hi,
i upgrade my drupal site to 7.35... and in register process when create e new account or reset password i have warning about number parameters of function user_pass_rehash in i18n\i18n_user\i18n_user.module at line 68 and 57... i hope to insert $account->uid parameters but registration don't work... any idea?
Thanks a lot
find a patch
https://www.drupal.org/files/issues/2455093_drupal735-1.patch
That work for me! Thank you
Having these messages after registration:
Warning: Missing argument 4 for user_pass_rehash(), called in sites/all/modules/i18n/i18n_user/i18n_user.module on line 57 and defined in user_pass_rehash() (line 2406 of modules/user/user.module).
Warning: Missing argument 4 for user_pass_rehash(), called in sites/all/modules/i18n/i18n_user/i18n_user.module on line 68 and defined in user_pass_rehash() (line 2406 of modules/user/user.module).
Warning: Missing argument 4 for user_pass_rehash(), called in sites/all/modules/i18n/i18n_user/i18n_user.module on line 57 and defined in user_pass_rehash() (line 2406 of modules/user/user.module).
Warning: Missing argument 4 for user_pass_rehash(), called in sites/all/modules/i18n/i18n_user/i18n_user.module on line 68 and defined in user_pass_rehash() (line 2406 of modules/user/user.module)
I've found your answer and patch solved this. Thank you!!
Fix released in 7.x-1.13
https://www.drupal.org/node/2484731