php - Wordpress woocomerce redirecting to https in chrome browser -
wordpress woocomerce plugin (version < 2.3.12) redirects https when accessed chrome browser version 44.
the initial request complete on http, resources in response (css, js, links) prefixed https.
requests login redirect https.
a call is_ssl()
(wp-included/functions.php) returns true in chrome.
function is_ssl() { if ( isset($_server['https']) ) { if ( 'on' == strtolower($_server['https']) ) return true; if ( '1' == $_server['https'] ) return true; } elseif ( isset($_server['server_port']) && ( '443' == $_server['server_port'] ) ) { return true; } return false; }
but false in other tested browsers
this due combination of chrome v44 sending new request header https = 1
every request, , woocomerce version < 2.3.12 incorrectly identifying presence of header indicate request being served via https proxy server.
the code in question can found in /wp_content/woocommerce/woocommerce.php
:
if ( ! isset( $_server['https'] ) && ! empty( $_server['http_https'] ) ) $_server['https'] = $_server['http_https'];
to fix problem, can comment out these lines (via ftp or on server directly).
alternativy, can upgrade woocomerce plugin latest version (this fixed in v 2.3.12), either using anouther browser log in admin panel, or upgrading chrome latest version.
this fixed in chrome https://code.google.com/p/chromium/issues/detail?id=505268 , users quick update, not long term problem, caused me enough headaches thought worth bringing here
many https://ma.ttias.be/chrome-44-sending-https-header-by-mistake-breaking-web-applications-everywhere/
Comments
Post a Comment