Make WordPress Core


Ignore:
Timestamp:
10/31/2008 11:14:37 PM (17 years ago)
Author:
azaozz
Message:

Do cap check when shoving a preview

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r9451 r9452  
    35583558        $post_ID = (int) $_GET['wp_preview'];
    35593559
    3560         if ( false == wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $post_ID ) )
     3560        if ( false == wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $post_ID ) || ! current_user_can('edit_post', $post_ID) )
    35613561            wp_die( __('You do not have permission to preview drafts.') );
    35623562
Note: See TracChangeset for help on using the changeset viewer.