Opened 8 years ago
Closed 8 years ago
#34397 closed defect (bug) (wontfix)
Microsoft-IIS detection in the wp_fix_server_vars() function
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.4 |
Component: | General | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
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.
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.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Replying to 3sq:
If you're doing something as bizarre as spoofing IIS with Apache then you at least need to have a real IIS server available to determine that you're doing it correctly.
Your server should correctly set the
$_SERVER
query variables similar to, for example, how a reverse proxy needs to.Let's not waste our time on self-inflicted issues like this, even as minor as it is.