WordPress.org

Make WordPress Core

Ticket #16482: 16482._wp_http_referer.diff

File 16482._wp_http_referer.diff, 811 bytes (added by duck_, 3 years ago)
  • wp-includes/post-template.php

     
    12111211        $label = 'pwbox-'.(empty($post->ID) ? rand() : $post->ID); 
    12121212        $output = '<form action="' . get_option('siteurl') . '/wp-pass.php" method="post"> 
    12131213        <p>' . __("This post is password protected. To view it please enter your password below:") . '</p> 
     1214        <input type="hidden" name="_wp_http_referer" value="' . esc_attr( get_permalink( $post ) ) . '" /> 
    12141215        <p><label for="' . $label . '">' . __("Password:") . ' <input name="post_password" id="' . $label . '" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr__("Submit") . '" /></p> 
    12151216        </form> 
    12161217        ';