Skip to content

Commit

Permalink
Pass logged_in cookie to async-upload. Props nbachiyski. fixes #10739
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.automattic.com/wordpress/trunk@11904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
ryan committed Sep 8, 2009
1 parent 9d1f82b commit e8c32c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wp-admin/async-upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
$_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie'];
elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
$_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie'];
if ( empty($_COOKIE[LOGGED_IN_COOKIE]) && !empty($_REQUEST['logged_in_cookie']) )
$_COOKIE[LOGGED_IN_COOKIE] = $_REQUEST['logged_in_cookie'];
unset($current_user);
require_once('admin.php');

Expand Down
1 change: 1 addition & 0 deletions wp-admin/includes/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -1331,6 +1331,7 @@ function media_upload_form( $errors = null ) {
post_params : {
"post_id" : "<?php echo $post_id; ?>",
"auth_cookie" : "<?php if ( is_ssl() ) echo $_COOKIE[SECURE_AUTH_COOKIE]; else echo $_COOKIE[AUTH_COOKIE]; ?>",
"logged_in_cookie": "<?php echo $_COOKIE[LOGGED_IN_COOKIE]; ?>",
"_wpnonce" : "<?php echo wp_create_nonce('media-form'); ?>",
"type" : "<?php echo $type; ?>",
"tab" : "<?php echo $tab; ?>",
Expand Down

0 comments on commit e8c32c0

Please sign in to comment.