4 ms·
Naively this seems like a PHP bug, using the UA submitted host? Is that necessary?
by pbhjpbhj 10y ago
Naively this seems like a PHP bug, using the UA submitted host? Is that necessary?
- gondo 10y agonot PHP bug, but Apache bug: "However, major web servers such as Apache by default set the SERVER_NAME variable using the hostname supplied by the client (within the HTTP_HOST header):"
- mintplant 10y agoNot an Apache bug but Wordpress trusting client-supplied data where it shouldn't. SERVER_NAME coming from the HTTP Host header is intentional and documented behavior, ergo not a bug.
- edoceo 10y agoNot even an Apache bug, it's a config parameter where one case is dangerous but still maybe useful (but I can't think of example). The recommendation, if followed, mitigates
- TazeTSchnitzel 10y agoSERVER_NAME isn't part of PHP so much as part of CGI. That's where PHP's $_SERVER keys come from. And the values are set by the web server.