diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index 33276d26fa..86f12e1a38 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -3219,7 +3219,7 @@ function wp_ajax_crop_image() { $attachment_id = absint( $_POST['id'] ); check_ajax_referer( 'image_editor-' . $attachment_id, 'nonce' ); - if ( ! current_user_can( 'customize' ) ) { + if ( empty( $attachment_id ) || ! current_user_can( 'edit_post', $attachment_id ) ) { wp_send_json_error(); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 083c52db46..9644347ca3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-alpha-41269'; +$wp_version = '4.9-alpha-41270'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.