[wp-trac] [WordPress Trac] #38414: class-wp-list-table.php generating wrong URL

WordPress Trac noreply at wordpress.org
Thu Oct 20 14:44:58 UTC 2016


#38414: class-wp-list-table.php generating wrong URL
----------------------------+-----------------------------
 Reporter:  tnash           |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  trunk
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 Line 768 within class-wp-list-table.php in the pagination function is:
 {{{
 $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] .
 $_SERVER['REQUEST_URI'] );
 }}}
 This can result in some very weird anomalies if the HTTP_HOST is being
 mapped in a weird way (for example behind a proxy, the result can be
 instead of the domain, an IP is returned).

 A simple fix is to use the home_url as the substitute for the HTTP_HOST
 but probably better to guarantee it's returning the correct data would be
 to use site_url as it's calling a specific file within the site_url
 structure.

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


More information about the wp-trac mailing list