[Plugin: WordPress MU Domain Mapping] plugin modifies HTTPS server var which interferes with other p
-
I’ve run into an issue where using the Domain Mapping plugin and the Net_URL2 pear package [1] which causes Net_URL2::getRequested to always return an https url.
When the domain mapping plugin is running and generating a mapped url it changes the value of $_SERVER[‘HTTPS’] to ‘off’ when it wasn’t set, this causes logic that is just looking for ‘HTTPS’ being set to return true even when the request was actually http.
The documentation[2] for the variable states it should be “Set to a non-empty value if the script was queried through the HTTPS protocol.” There is a caveat that IIS sets it to off when it’s not an HTTPS request, but that caveat was addressed with this bug report[3]
There is no real reason for the domain mapping plugin to actually have to change the state of the variable, here is a patch[4] that updates the plugin to just examine the state of the variable and not update it’s value.
[1] http://pear.php.net/package/Net_URL2/
[2] http://us2.php.net/manual/en/reserved.variables.server.php
[3] https://bugs.php.net/bug.php?id=55403
[4] https://github.com/frett/wordpress-mu-domain-mapping/compare/master…httpsVarhttp://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/
- The topic ‘[Plugin: WordPress MU Domain Mapping] plugin modifies HTTPS server var which interferes with other p’ is closed to new replies.