Chrome 44 Sending HTTPs Header By Mistake, Breaking Web Applications Everywhere

Now this is interesting.

In the Chrome 44 release that happened just yesterday, it appears the browser got a small bug significant change.

It's now sending the HTTPS: 1 header on every request by default. This was probably meant as a security improvement, to suggest HTTPs to the server wherever possible, but it's breaking WordPress and other webserver installations all over the place.

chrome_https_mistake_bug

Why? Because most PHP software uses $_SERVER['HTTPS']; to detect if the site is running behind an SSL certificate or not. This includes WordPress, Drupal and any custom PHP software that checks this header.

if ($_SERVER['HTTPS']) { 
  // Assume HTTPs, redirect or enable https:// prefixes on all resources (css/js/images/...)
  ...
}

The next planned release of Chrome is scheduled on July 27th, but they're investigating if an emergency patch can be sent out to resolve this issue.

Bugtracker: Issue 505268: Forcing WordPress sites to use https even when not directed.

This is not going to be a fun week for Chrome users.

The Social Box

You can sign up for more updates via Twitter or Facebook below. On Twitter, I regularly talk about technology or tweet about interesting stories. Topics that don't necessarily make it to this blog. Facebook contains a steady update of blogposts and some more lightweight stories.

The @mattiasrss account has an automated RSS feed of all blogposts that get published.




Write a Comment

Do you care about the markup if your comment? You can use the following HTML tags:

<code>command</code>: command highlighting
<pre>text</pre>: pre-formatted code, can be multi-line (black background, white letters)

example <pre> tag
<blockquote>text</blockquote> quoted text
quoted example


None of this is needed of course, it's all optional!

Comment

*

    • It’s not a bad PHP design decision, it’s a bad design decision of whoever is using it that way in PHP. To be fair that code is actually only reading a HTTP header variable, so its not bad or good, its up to you how you wish to use it. Depending on it and assuming HTTPS is incorect.

      • No.. no, this is a PHP problem if that header is overwriting $_SERVER[‘HTTPS’].

        per the docs:

        > ‘HTTPS’
        > Set to a non-empty value if the script was queried through the HTTPS protocol.

  1. I’ve checked a number of Drupal sites on a variety of hosting platforms, and from what I can tell Drupal is not effected.

    Drupal checks for the value of ‘on’ rather then just a bool value of $_SERVER[‘HTTPS’]


    includes/bootstrap.inc
    735: $is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on';