[wp-trac] [WordPress Trac] #16932: Media Upload top navigation producing wrong URLs when WordPress is run behind a ReverseProxy
WordPress Trac
wp-trac at lists.automattic.com
Tue Mar 22 15:11:52 UTC 2011
#16932: Media Upload top navigation producing wrong URLs when WordPress is run
behind a ReverseProxy
----------------------------+------------------------------
Reporter: tploch | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 3.1
Severity: normal | Resolution:
Keywords: |
----------------------------+------------------------------
Comment (by tploch):
Ok, I tracked down the problem to the following line of code
wp-admin/includes/media.php - function the_media_upload_tabs() - lines 81
- 82
{{{
$href = add_query_arg(array('tab'=>$callback, 's'=>false, 'paged'=>false,
'post_mime_type'=>false, 'm'=>false));
$link = "<a href='" . esc_url($href) . "'$class>$text</a>";
}}}
When changing this to the following code, it is failsafe since the
absulute URL is used:
{{{
$href = add_query_arg(array('tab'=>$callback, 's'=>false, 'paged'=>false,
'post_mime_type'=>false, 'm'=>false));
$link = "<a href='" . esc_url(home_url() . $href) . "'$class>$text</a>";
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16932#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list