Changeset 34059 for trunk/src/wp-admin/async-upload.php
- Timestamp:
- 09/11/2015 09:07:45 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/async-upload.php
r33842 r34059 7 7 */ 8 8 9 // `wp_validate_action()` isn't loaded yet 9 10 if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) { 10 11 define( 'DOING_AJAX', true ); … … 20 21 require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' ); 21 22 22 if ( ! ( isset( $_REQUEST['action'] ) && 'upload-attachment' == $_REQUEST['action']) ) {23 if ( ! wp_validate_action( 'upload-attachment' ) ) { 23 24 // Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead 24 25 if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) ) … … 35 36 header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) ); 36 37 37 if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action']) {38 if ( wp_validate_action( 'upload-attachment' ) ) { 38 39 include( ABSPATH . 'wp-admin/includes/ajax-actions.php' ); 39 40
Note: See TracChangeset
for help on using the changeset viewer.