3 ms·
Chrome isn't breaking the applications. The applications are breaking the applications
by jbverschoor 11y ago
Chrome isn't breaking the applications. The applications are breaking the applications
- deleted 11y ago[deleted]
- detaro 11y agoShouldn't a header called HTTPS end up in $_SERVER['HTTP_HTTPS'] and not 'HTTPS'?
- zodiakzz 11y agoYup and this sounds like a massive security hole in PHP if you can change $_SERVER elements like 'REMOTE_ADDR' with headers.
- deleted 11y ago[deleted]
- nolok 11y agoIt's not in PHP, its in Apache. Apache's the one in charge of reading the request and passing to PHP the server variables, it's the one who made the contract that HTTPS means the request was made over HTTPS, it's the one who send to the called handler the value of HTTPS and it's also the one who put the wrong value in it. It wrongly put the browser-sent header in there overwriting it's own variable (or creating it when it shouldn't).
- dangrossman 11y agoIt depends on the web server and runtime environment in use. WooCommerce for example examines both of those variables, as either or both might be set.
- ajross 11y agoThis is a web browser. Bug-for-bug compatibility with 2+ decade old content servers is a fundamental requirement. Yes, standards are great. But you can't break sites.
- Cakez0r 11y agoI'd say it's more like a courtesy than a fundamental requirement. Obviously Chrome has overstepped the mark here, but you can't just perpetually support entrenched bugs otherwise you end up with a browser like internet explorer.
- ajross 11y agoEverything is relative, and surely there are some misfeatures that simply can't be handled gracefully. But broadly, no: if some user wants to hit a archived site from 1995 using Chrome 44, I think virtually everyone would expect that to work and not fail. To take your extrapolation in the other direction: you're arguing that if we want to hit old stuff that we need to do it in a VM running Windows 98 and IE4.
- Cakez0r 11y agoSounds more like a language issue. $_SERVER is an array containing information such as headers, paths, and script locations. You may or may not find any of the following elements in $_SERVER. 'HTTPS' Set to a non-empty value if the script was queried through the HTTPS protocol. https://secure.php.net/manual/en/reserved.variables.server.php https://secure.php.net/manual/en/reserved.variables.server.p...
- detaro 11y agoBut then the environments violate that specification if they set this variable off a random HTTP header?
- Cakez0r 11y agoIf the language spec says that $_SERVER['HTTPS'] is an indicator of whether the request was made over HTTPS, then it should ensure that it adheres to its own spec (I.E. not overwrite $_SERVER['HTTPS'] with the value from a header, if it's present).
- nolok 11y agoIt does. The problem is in Apache, not the language. Apache's says to look into the HTTPS variable (that it adds itself before passing the call to the handler) to know if the call was made over https, but then it overwrite that variable with the browser-sent header if there is one (or more exactly, it uses the same variable name for that header and it's own HTTPS indicator; so it overwrites if both are present, and if only the header is present then it creates it when it shouldn't -- the issue in this post).
- TazeTSchnitzel 11y agoThat's not an issue with PHP itself. $_SERVER maps directly to CGI variables (or equivalents provided by the web server in non-CGI environments).