Do cap check when shoving a preview

git-svn-id: https://develop.svn.wordpress.org/trunk@9452 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2008-10-31 23:14:37 +00:00
parent 78b8de31b6
commit acf73adf61
1 changed files with 1 additions and 1 deletions

View File

@ -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(