Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#7935 closed defect (bug) (wontfix)

wp-login.php Doesn't Redirect to Admin if Already Logged in

Reported by: Speedboxer Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch
Focuses: Cc:


When you go to wp-login.php when you're logged in, you'd expect it to redirect you to the admin, but it doesn't.

I'm not sure if this was intended, but it doesn't seem right to me.

Attachments (1)

7935.diff (631 bytes) - added by Speedboxer 7 years ago.

Download all attachments as: .zip

Change History (3)

7 years ago

#1 @Speedboxer
7 years ago

  • Keywords has-patch added

Not sure if my patch does this the best way, but it works.

#2 @ryan
7 years ago

  • Milestone 2.7 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

is_user_logged_in() only checks the loggedin cookie, not the auth cookies. It can't check the auth cookies because they are delivered only for wp-admin. This makes doing redirects based on the loggedin cookie unreliable because you can't be sure the auth cookie is properly set. Usually both the auth and the loggedin are set in tandem, but the SSL settings and unexpected funkiness can prevent that. For now, I'd rather not risk infinite redirects. Ee can revisit this in a later release and consider wp-admin/login.php so we can do it right. Closing as wontfix in the meantime.

Note: See TracTickets for help on using tickets.