Changeset 10486
- Timestamp:
- 02/03/2009 05:03:16 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/pluggable.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/pluggable.php
r10469 r10486 489 489 } 490 490 491 $key = wp_hash($username . '|' . $expiration, $scheme);492 $hash = hash_hmac('md5', $username . '|' . $expiration, $key);493 494 if ( $hmac != $hash ) {495 do_action('auth_cookie_bad_hash', $cookie_elements);496 return false;497 }498 499 491 $user = get_userdatabylogin($username); 500 492 if ( ! $user ) { … … 503 495 } 504 496 497 $pass_frag = substr($user->user_pass, 8, 4); 498 499 $key = wp_hash($username . $pass_frag . '|' . $expiration, $scheme); 500 $hash = hash_hmac('md5', $username . '|' . $expiration, $key); 501 502 if ( $hmac != $hash ) { 503 do_action('auth_cookie_bad_hash', $cookie_elements); 504 return false; 505 } 506 505 507 do_action('auth_cookie_valid', $cookie_elements, $user); 506 508 … … 525 527 $user = get_userdata($user_id); 526 528 527 $key = wp_hash($user->user_login . '|' . $expiration, $scheme); 529 $pass_frag = substr($user->user_pass, 8, 4); 530 531 $key = wp_hash($user->user_login . $pass_frag . '|' . $expiration, $scheme); 528 532 $hash = hash_hmac('md5', $user->user_login . '|' . $expiration, $key); 529 533
Note: See TracChangeset
for help on using the changeset viewer.