Changeset 24466 for trunk/wp-includes/post-template.php
- Timestamp:
- 06/21/2013 03:00:26 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post-template.php
r24377 r24466 589 589 */ 590 590 function post_password_required( $post = null ) { 591 global $wp_hasher;592 593 591 $post = get_post($post); 594 592 … … 599 597 return true; 600 598 601 if ( empty( $wp_hasher ) ) { 602 require_once( ABSPATH . 'wp-includes/class-phpass.php'); 603 // By default, use the portable hash from phpass 604 $wp_hasher = new PasswordHash(8, true); 605 } 599 require_once ABSPATH . 'wp-includes/class-phpass.php'; 600 $hasher = new PasswordHash( 8, true ); 606 601 607 602 $hash = wp_unslash( $_COOKIE[ 'wp-postpass_' . COOKIEHASH ] ); 608 609 return ! $wp_hasher->CheckPassword( $post->post_password, $hash ); 603 if ( 0 !== strpos( $hash, '$P$B' ) ) 604 return true; 605 606 return ! $hasher->CheckPassword( $post->post_password, $hash ); 610 607 } 611 608
Note: See TracChangeset
for help on using the changeset viewer.