[wp-trac] [WordPress Trac] #34397: Microsoft-IIS detection in the wp_fix_server_vars() function
WordPress Trac
noreply at wordpress.org
Thu Oct 22 14:36:32 UTC 2015
#34397: Microsoft-IIS detection in the wp_fix_server_vars() function
--------------------------+-----------------------------
Reporter: 3sq | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
We spoof our Apache version as IIS (just to be difficult). However this
means that on line 55 of wp-includes/load.php it is detected as IIS when
it is not.
The issue occurs on line 79 when the QUERY_STRING var is appended to the
REQUEST_URI which already has the query string in it. (I assume on IIS
this is not the case).
Replacing line 78 with the following uses parse_url() to check that the
REQUEST_URI param does not actually have any query vars before appending
them.
{{{#!php
if ( ! empty( $_SERVER['QUERY_STRING'] ) && ! parse_url(
$_SERVER['REQUEST_URI'], PHP_URL_QUERY ) ) {
}}}
I think this should solve our issue but also not break the server var
changes.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34397>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list