[wp-trac] [WordPress Trac] #33821: redirect_canonical does not consider port in $compare_original

WordPress Trac noreply at wordpress.org
Fri Sep 11 03:18:18 UTC 2015


#33821: redirect_canonical does not consider port in $compare_original
--------------------------+-----------------------------
 Reporter:  willshouse    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.3
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 In the `wp-includes/canonical.php` file the $requested_url is built
 starting at line 64. It combines is_ssl() for protocol,
 $_SERVER['HTTP_HOST'], and $_SERVER['REQUEST_URI'] - but it does not
 consider $_SERVER['SERVER_PORT']

 This causes a redirect loop for us because we run HTTPS on port 8443.

 I suggest checking to see if a port other than 80 or 443 is being used and
 adding that as part of the comparison - suggested patch attached.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33821>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list