Ticket #25663: 25663.2.diff
File 25663.2.diff, 2.7 KB (added by , 11 years ago) |
---|
-
src/wp-admin/async-upload.php
13 13 else 14 14 require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' ); 15 15 16 if ( ! ( isset( $_REQUEST['action'] ) && 'upload-attachment' == $_REQUEST['action'] ) ) { 17 // Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead 18 if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) ) 19 $_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie']; 20 elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) ) 21 $_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie']; 22 if ( empty($_COOKIE[LOGGED_IN_COOKIE]) && !empty($_REQUEST['logged_in_cookie']) ) 23 $_COOKIE[LOGGED_IN_COOKIE] = $_REQUEST['logged_in_cookie']; 24 unset($current_user); 16 // Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead 17 if ( is_ssl() && empty( $_COOKIE[SECURE_AUTH_COOKIE] ) && ! empty( $_REQUEST['auth_cookie'] ) ) { 18 $_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie']; 19 } elseif ( empty( $_COOKIE[AUTH_COOKIE] ) && ! empty( $_REQUEST['auth_cookie'] ) ) { 20 $_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie']; 25 21 } 26 22 23 if ( empty( $_COOKIE[LOGGED_IN_COOKIE] ) && ! empty( $_REQUEST['logged_in_cookie'] ) ) { 24 $_COOKIE[LOGGED_IN_COOKIE] = $_REQUEST['logged_in_cookie']; 25 } 26 27 unset( $current_user ); 28 27 29 require_once( ABSPATH . 'wp-admin/admin.php' ); 28 30 29 31 if ( !current_user_can('upload_files') ) -
src/wp-admin/includes/media.php
1743 1743 1744 1744 $post_params = array( 1745 1745 "post_id" => $post_id, 1746 "auth_cookie" => ( is_ssl() ? $_COOKIE[SECURE_AUTH_COOKIE] : $_COOKIE[AUTH_COOKIE] ), 1747 "logged_in_cookie" => $_COOKIE[LOGGED_IN_COOKIE], 1746 1748 "_wpnonce" => wp_create_nonce('media-form'), 1747 1749 "type" => $_type, 1748 1750 "tab" => $_tab, -
src/wp-includes/media.php
2186 2186 2187 2187 $params = apply_filters( 'plupload_default_params', $params ); 2188 2188 $params['_wpnonce'] = wp_create_nonce( 'media-form' ); 2189 $params['auth_cookie'] = ( is_ssl() ? $_COOKIE[SECURE_AUTH_COOKIE] : $_COOKIE[AUTH_COOKIE] ); 2190 $params['logged_in_cookie'] = $_COOKIE[LOGGED_IN_COOKIE]; 2191 2189 2192 $defaults['multipart_params'] = $params; 2190 2193 2191 2194 $settings = array(