Login Cookies TOO Secure
-
Okay, this was driving me nuts (actually, it’s more of a short putt *<:o)
I wrote this kewl plugin to transmogrify the siteurl requests to my localhost/test VM:
function test_localhosts( $ret ) { if ( preg_match ( '|10\.211\.55\.2|', $_SERVER['SERVER_ADDR'] ) ) { $ret = "https://10.211.55.2/~cmarshall/littlegreenviper.com/public_html/main"; } elseif ( preg_match ( '|127\.0\.0\.1|', $_SERVER['SERVER_ADDR'] ) || preg_match ( '|localhost|', $_SERVER['REQUEST_URI'] ) ) { $ret = "https://localhost/~cmarshall/littlegreenviper.com/public_html/main"; } return $ret; } add_filter ( 'pre_option_home', 'test_localhosts', 0, 1 ); add_filter ( 'pre_option_siteurl', 'test_localhosts', 0, 1 ); add_filter ( 'bloginfo_url', 'test_localhosts', 0, 1 );
However, it will never let me log in as an admin. I finally figured out that the COOKIE_HASH was stinky.
This is because COOKIE_HASH does a get_info(‘siteurl’) BEFORE the plugins are applied, yet the comparison is done AFTER they are applied.
This is very, very annoying. Is there the slightest chance that we could figure out a way to make the COOKIE_HASH chill when I am running this on a test server?
Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Login Cookies TOO Secure’ is closed to new replies.