Posts: Set a HTTP 403 error when an incorrect post preview nonce is sent.
Props graymouser. Fixes #43570. git-svn-id: https://develop.svn.wordpress.org/trunk@44610 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
efcc69ed84
commit
5aeabd7fbf
@ -582,7 +582,7 @@ function _show_post_preview() {
|
||||
$id = (int) $_GET['preview_id'];
|
||||
|
||||
if ( false === wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) ) {
|
||||
wp_die( __( 'Sorry, you are not allowed to preview drafts.' ) );
|
||||
wp_die( __( 'Sorry, you are not allowed to preview drafts.' ), 403 );
|
||||
}
|
||||
|
||||
add_filter( 'the_preview', '_set_preview' );
|
||||
|
Loading…
Reference in New Issue
Block a user