Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#38274 closed defect (bug) (invalid)

wp_set_auth_cookie and FileSystem relation

Reported by: rezamarandi's profile rezamarandi Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6.1
Component: Login and Registration Keywords: reporter-feedback
Focuses: Cc:


guys i have a new fresh installed on digital ocean server
my theme do wordpress reseting and then create new auth cookie with bottom code :

wp_set_current_user($user_id, $user->user_login);
if ($session_tokens)
        delete_user_meta($user->ID, 'session_tokens');
        update_user_meta($user->ID, 'session_tokens', $session_tokens);

wp_set_auth_cookie($user_id, true);
do_action('wp_login', $user->user_login);

its interesting because this piece of code will not work when the ownership of wordpress directory is not apache user for example :
but it will works when we change ownership of server to : www-data:www-data

Change History (2)

#1 @dd32
8 years ago

  • Keywords reporter-feedback added

Hi @rezamarandi and welcome to Trac.

Indeed the script should operate the same in both of those configurations, there's no restriction in WordPress which would prevent it from doing so.
This feels like it could potentially be caused by a strange server mis-configuration.

Can you supply the full headers output when you request the script in both modes?

#2 @johnbillion
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Please re-open if you can provide further details.

Note: See TracTickets for help on using tickets.