Changeset 3813 for branches/2.0/wp-includes/pluggable-functions.php
- Timestamp:
- 05/31/2006 05:01:09 AM (20 years ago)
- File:
-
- 1 edited
-
branches/2.0/wp-includes/pluggable-functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/wp-includes/pluggable-functions.php
r3780 r3813 489 489 490 490 //Allow for expanding range, but only do one check if we can 491 if( substr( md5($i . DB_PASSWORD . $action . $uid), -12, 10) == $nonce || substr(md5(($i - 1) . DB_PASSWORD. $action . $uid), -12, 10) == $nonce )491 if( substr(wp_hash($i . $action . $uid), -12, 10) == $nonce || substr(wp_hash(($i - 1) . $action . $uid), -12, 10) == $nonce ) 492 492 return true; 493 493 return false; … … 502 502 $i = ceil(time() / 43200); 503 503 504 return substr(md5($i . DB_PASSWORD . $action . $uid), -12, 10); 504 return substr(wp_hash($i . $action . $uid), -12, 10); 505 } 506 endif; 507 508 if ( !function_exists('wp_salt') ) : 509 function wp_salt() { 510 $salt = get_option('secret'); 511 if ( empty($salt) ) 512 $salt = DB_PASSWORD . DB_USER . DB_NAME . DB_HOST . ABSPATH; 513 514 return $salt; 515 } 516 endif; 517 518 if ( !function_exists('wp_hash') ) : 519 function wp_hash($data) { 520 $salt = wp_salt(); 521 522 if ( function_exists('hash_hmac') ) { 523 return hash_hmac('md5', $data, $salt); 524 } else { 525 return md5($data . $salt); 526 } 505 527 } 506 528 endif;
Note: See TracChangeset
for help on using the changeset viewer.