[Plugin: WordPress HTTPS (SSL)] Cookies mandatory?!
-
Hi,
After the upgrade to 3.0 and 3.0.1, our site doesn’t work if you have cookies deactivated. Instead, the following content appears in the source code:
<!-- WordPress HTTPS Proxy Check --> <script type="text/javascript">function getCookie(a){var b=document.cookie;var c=a+"=";var d=b.indexOf("; "+c);if(d==-1){d=b.indexOf(c);if(d!=0)return null}else{d+=2;var e=document.cookie.indexOf(";",d);if(e==-1){e=b.length}}return unescape(b.substring(d+c.length,e))}if(getCookie("wp_proxy")!=true){if(window.location.protocol=="https:"){document.cookie="wp_proxy=1; path=/; expires=Wed, 20-Apr-2022 16:48:03 GMT"}else if(getCookie("wp_proxy")==null){document.cookie="wp_proxy=0; path=/; expires=Wed, 20-Apr-2022 16:48:03 GMT"}if(getCookie("wp_proxy")!=null){window.location.reload()}else{document.write("You must enable cookies.")}}</script> <noscript>Your browser does not support JavaScript.</noscript>This behaviour is pretty bad. Cookies or js are not supposed to be mandatory to browse our website (we actually have a few users who don’t enable cookies) and tends to go against the rules of our company.
For now I have commented out the following piece of Hooks.php, but I don’t know if I broke anything else by doing so:
if ( ! $this->getPlugin()->isSsl() && ! isset($_COOKIE['wp_proxy']) ) { add_action('init', array(&$this, 'proxy_check'), 1); add_action('admin_init', array(&$this, 'proxy_check'), 1); add_action('login_head', array(&$this, 'proxy_check'), 1); }Also somewhat related, it appears that this plugin forces HTTPS on xmlrpc.php. But the client library included in WordPress (IXR) to access this xmlrpc server doesn’t seem to support HTTPS. So, while I think your plugin is doing the right thing since xmlrpc requires to login, it feels weird that one wordpress script (class IXR) is not able to use a script the very same provides (xmlrpc.php).
While I don’t quite understand what this proxy thing is doing, it really seems to be doing it in the bad way, by requiring cookies, and then replacing the output by some javascript code. Moreover, inserting JS is only meaningful for HTML documents. While we were debugging v3.0, we got this code inserted in the output of xmlrpc.php which makes absolutely no sense in XML-RPC world.
Are you planning to revamp that feature to make it less intrusive? Or maybe allow to deactivate it?
Thanks!
The topic ‘[Plugin: WordPress HTTPS (SSL)] Cookies mandatory?!’ is closed to new replies.