Do cap check when shoving a preview
git-svn-id: http://svn.automattic.com/wordpress/trunk@9452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9fba444f3b
commit
1e4e3ec57e
|
@ -3557,7 +3557,7 @@ function _show_post_preview() {
|
|||
if ( isset($_GET['wp_preview']) && isset($_GET['preview_nonce']) ) {
|
||||
$post_ID = (int) $_GET['wp_preview'];
|
||||
|
||||
if ( false == wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $post_ID ) )
|
||||
if ( false == wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $post_ID ) || ! current_user_can('edit_post', $post_ID) )
|
||||
wp_die( __('You do not have permission to preview drafts.') );
|
||||
|
||||
$q = array(
|
||||
|
|
Loading…
Reference in New Issue