Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • @willem.deboer

    Everything happens inside wp-login.php, so you can use an old version (<3.7). I did not check if there were any other changes, so if there were security fixes or other changes you won’t have those. I recommend editing out those 3 lines. That will make sure everything else stays compatible.

    @sos – 2013

    If you have FTP access or any other form of access to the filesystem (cpanel, ssh, etc) just comment out the lines as I explained in my previous post. You will be able to log in again like usual. There is no need to reinstall wordpress at all.

    I encountered the same issue and have managed to make it work, and a theory of what could be the issue.

    First of all, how to get logged in again. Comment out lines 744-746 in wp-login.php . It should look like this:

    //	if ( isset($_POST['testcookie']) && empty($_COOKIE[TEST_COOKIE]) )
    //		$user = new WP_Error('test_cookie', __("<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href='http://www.google.com/cookies.html'>enable cookies</a> to use WordPress."));
    //	else
    		$user = wp_signon('', $secure_cookie);

    This will bypass the check entirely and logs you in.

    At first I didn’t understand why it might fail, but then I remembered I am running behind a Varnish cache which filters out all but some select cookies. I haven’t checked, but I am fairly certain that my Varnish setup filters out the WordPress test cookie when it receives the login request (the actual POST with the login data). Is it possible all of you are running behind a proxy which filters cookies?

    This is pretty sloppy by the WordPress team. They could also just test the session cookie. If THAT one doesn’t get through, it will fail anyway. Completely breaking when a test cookie is missing should not happen.

    I hope this helps…

Viewing 2 replies - 1 through 2 (of 2 total)