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:
Gary Pendergast 2019-01-16 03:53:42 +00:00
parent efcc69ed84
commit 5aeabd7fbf
1 changed files with 1 additions and 1 deletions

View File

@ -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' );