Changeset 3810
- Timestamp:
- 05/31/2006 12:24:03 AM (19 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/upgrade-schema.php
r3772 r3810 225 225 add_option('upload_path', 'wp-content/uploads'); 226 226 } 227 228 // 2.0.3 229 add_option('secret', md5(uniqid(microtime()))); 230 227 231 // 2.1 228 232 add_option('blog_public', 1); -
trunk/wp-includes/cache.php
r3798 r3810 143 143 } 144 144 145 $cache_file = $this->cache_dir.$this->get_group_dir($group)."/". md5($id.DB_PASSWORD).'.php';145 $cache_file = $this->cache_dir.$this->get_group_dir($group)."/".$this->hash($id).'.php'; 146 146 if (!file_exists($cache_file)) { 147 147 $this->non_existant_objects[$group][$id] = true; … … 172 172 173 173 return "{$this->blog_id}/$group"; 174 } 175 176 function hash($data) { 177 global $wp_server_secret; 178 if ( empty($wp_server_secret) ) 179 $wp_server_secret = DB_PASSWORD; 180 181 if ( function_exists('hash_hmac') ) { 182 return hash_hmac('md5', $data, $wp_server_secret); 183 } else { 184 return md5($data . $wp_server_secret); 185 } 174 186 } 175 187 … … 323 335 $ids = array_unique($ids); 324 336 foreach ($ids as $id) { 325 $cache_file = $group_dir. md5($id.DB_PASSWORD).'.php';337 $cache_file = $group_dir.$this->hash($id).'.php'; 326 338 327 339 // Remove the cache file if the key is not set. … … 415 427 $this->expiration_time = CACHE_EXPIRATION_TIME; 416 428 417 $this->blog_id = md5($blog_id);429 $this->blog_id = $this->hash($blog_id); 418 430 } 419 431 } -
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; -
trunk/wp-includes/version.php
r3798 r3810 4 4 5 5 $wp_version = '2.1-alpha1'; 6 $wp_db_version = 3 797;6 $wp_db_version = 3809; 7 7 8 8 ?>
Note: See TracChangeset
for help on using the changeset viewer.