[wp-trac] [WordPress Trac] #40060: Define ADMIN_COOKIE_PATH cause unreachable /wp-login.php

WordPress Trac noreply at wordpress.org
Tue Mar 7 14:44:53 UTC 2017


#40060: Define ADMIN_COOKIE_PATH cause unreachable /wp-login.php
--------------------------+------------------------------
 Reporter:  esemlabel     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Users         |     Version:  4.7.3
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by esemlabel):

 Temporary fix.

 {{{#!php
 <?php
 add_action( 'login_init', 'deal_with_ADMIN_COOKIE_PATH' );
 function deal_with_ADMIN_COOKIE_PATH() {
     if ( ( isset( $_COOKIE[AUTH_COOKIE] ) || isset(
 $_COOKIE[SECURE_AUTH_COOKIE] ) ) && ADMIN_COOKIE_PATH == COOKIEPATH ) {
         unset( $_COOKIE[ isset( $_COOKIE[AUTH_COOKIE] ) ? AUTH_COOKIE :
 SECURE_AUTH_COOKIE ] );
     }
 }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40060#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list