WordPress.org

Make WordPress Core

Ticket #17145: core_17145.diff

File core_17145.diff, 606 bytes (added by dllh, 3 years ago)
  • wp-includes/post-template.php

     
    557557        if ( !isset($_COOKIE['wp-postpass_' . COOKIEHASH]) ) 
    558558                return true; 
    559559 
    560         if ( $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password ) 
     560        if( get_magic_quotes_gpc() ) 
     561                $cookie = stripslashes( $_COOKIE['wp-postpass_' . COOKIEHASH] ); 
     562        else 
     563                $cookie = $_COOKIE['wp-postpass_' . COOKIEHASH]; 
     564 
     565        if ( $cookie  != $post->post_password ) 
    561566                return true; 
    562567 
    563568        return false;