[deleted]
Re:Forcing Wordpress sites to use https even when not directed
by detaro on Thursday July 23, 2015 @11:09AM
(#9936195)
Shouldn't a header called HTTPS end up in $_SERVER['HTTP_HTTPS'] and not 'HTTPS'?
Re:Forcing Wordpress sites to use https even when not directed
by dangrossman on Thursday July 23, 2015 @11:13AM
(#9936218)
It 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.
Re:Forcing Wordpress sites to use https even when not directed
by zodiakzz on Thursday July 23, 2015 @11:12AM
(#9936212)
Yup and this sounds like a massive security hole in PHP if you can change $_SERVER elements like 'REMOTE_ADDR' with headers.
Re:Forcing Wordpress sites to use https even when not directed
by nolok on Thursday July 23, 2015 @12:14PM
(#9936685)
It'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).