Opened 5 years ago
Closed 5 years ago
#7935 closed defect (bug) (wontfix)
wp-login.php Doesn't Redirect to Admin if Already Logged in
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
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)
Change History (3)
Speedboxer — 5 years ago
comment:1
Speedboxer — 5 years ago
- Keywords has-patch added
- 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.

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