Changeset 3810 for trunk/wp-includes/pluggable-functions.php
- Timestamp:
- 05/31/2006 12:24:03 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/pluggable-functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/pluggable-functions.php
r3783 r3810 492 492 493 493 //Allow for expanding range, but only do one check if we can 494 if( substr( md5($i . DB_PASSWORD . $action . $uid), -12, 10) == $nonce || substr(md5(($i - 1) . DB_PASSWORD. $action . $uid), -12, 10) == $nonce )494 if( substr(wp_hash($i . $action . $uid), -12, 10) == $nonce || substr(wp_hash(($i - 1) . $action . $uid), -12, 10) == $nonce ) 495 495 return true; 496 496 return false; … … 505 505 $i = ceil(time() / 43200); 506 506 507 return substr(md5($i . DB_PASSWORD . $action . $uid), -12, 10); 507 return substr(wp_hash($i . $action . $uid), -12, 10); 508 } 509 endif; 510 511 if ( !function_exists('wp_hash') ) : 512 function wp_hash($data) { 513 $secret = get_option('secret'); 514 if ( empty($secret) ) 515 $secret = DB_PASSWORD; 516 517 if ( function_exists('hash_hmac') ) { 518 return hash_hmac('md5', $data, $secret); 519 } else { 520 return md5($data . $secret); 521 } 508 522 } 509 523 endif;
Note: See TracChangeset
for help on using the changeset viewer.