[wp-trac] [WordPress Trac] #21602: redirect_canonical can lead to infinite loop on index navigation if site url is not all lower case

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 15 21:31:17 UTC 2012


#21602: redirect_canonical can lead to infinite loop on index navigation if site
url is not all lower case
--------------------------+-----------------------------
 Reporter:  sreedoap      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 The function redirect_canonical in wp-includes/canonical.php (WordPress
 3.4.1) on line 406 and 422 makes the following check:


 {{{
 if ( !$redirect_url || $redirect_url == $requested_url )
                 return false;
 }}}


 This ensures that it does not attempt to redirect you to the page you
 requested in the first place. However this function is not case sensitive
 so if the redirect URL is in a different case than the requested URL then
 the user can enter an infinite redirect loop. (For example if the Site
 Address (URL) of the site is set to be in all upper case.)

 This function should do a case-insensitive string comparison since domain
 names are case-insensitive.


 The issue only appears to happen with certain plugins installed (ShareThis
 and PilotPress both led to this issue,) I haven't figured out yet why it's
 only an issue with certain plugins but it should still be fixed in
 WordPress to make the proper string comparison.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21602>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list