[wp-trac] [WordPress Trac] #33131: Missing trailing slash when ssl cookie is set
WordPress Trac
noreply at wordpress.org
Sun Jul 26 21:07:39 UTC 2015
#33131: Missing trailing slash when ssl cookie is set
------------------------------------+-----------------------------
Reporter: m1au | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Login and Registration | Version: 4.2.3
Severity: normal | Keywords:
Focuses: |
------------------------------------+-----------------------------
Hi,
Im running wordpress on php commandline server, and can not use Rewrites,
and it seems that there is an trailing slash missing when ssl cookie is
set causing 404 on all links in admin section.
Non ssl seems to have trailing slash on wp-admin set
{{{
835
836 if ( ( empty( $redirect_to ) || $redirect_to == 'wp-
admin/' || $redirect_to == admin_url() ) ) {
837 // If the user doesn't belong to a blog, send
them to user admin. If the user can't edit posts, send them to their
profile.
838 if ( is_multisite() &&
!get_active_blog_for_user($user->ID) && !is_super_admin( $user->ID ) )
839 $redirect_to = user_admin_url();
}}}
whereas when ssl cookie is set there is no trailing slash added to wp-
admin
{{{
784 if ( isset( $_REQUEST['redirect_to'] ) ) {
785 $redirect_to = $_REQUEST['redirect_to'];
786 // Redirect to https if user wants ssl
787 if ( $secure_cookie && false !== strpos($redirect_to,
'wp-admin') )
788 $redirect_to = preg_replace('|^http://|',
'https://', $redirect_to);
789 } else {
790 $redirect_to = admin_url();
791 }
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33131>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list