Make WordPress Core

Changeset 18712


Ignore:
Timestamp:
09/19/2011 04:17:26 AM (14 years ago)
Author:
dd32
Message:

Allow Apostrophes in Post Passwords. $_POST and $_COOKIE are always slashed. Fixes #17145

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-template.php

    r18651 r18712  
    565565        return true;
    566566
    567     if ( $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password )
     567    if ( stripslashes( $_COOKIE['wp-postpass_' . COOKIEHASH] ) != $post->post_password )
    568568        return true;
    569569
  • trunk/wp-pass.php

    r16847 r18712  
    1010require( dirname(__FILE__) . '/wp-load.php');
    1111
    12 if ( get_magic_quotes_gpc() )
    13     $_POST['post_password'] = stripslashes($_POST['post_password']);
    14 
    1512// 10 days
    16 setcookie('wp-postpass_' . COOKIEHASH, $_POST['post_password'], time() + 864000, COOKIEPATH);
     13setcookie('wp-postpass_' . COOKIEHASH, stripslashes( $_POST['post_password'] ), time() + 864000, COOKIEPATH);
    1714
    1815wp_safe_redirect(wp_get_referer());
Note: See TracChangeset for help on using the changeset viewer.