Forums

Delete cookies for Safari (4 posts)

  1. Anonymous
    Unregistered
    Posted 9 years ago #

    I noticed that the login cookies were not getting deleted in Safari during logout, and instead new, empty, ones were being created with a slightly different path. This diff fixed the problem for me:

    --- ./wp-login.php Fri May 7 16:56:32 2004
    +++ /Library/WebServer/BitsOfLight/Docs/wordpress/wp-login.php Fri May 14 15:38:17 2004
    @@ -41,8 +41,8 @@ switch($action) {
    case 'logout':
    - setcookie('wordpressuser_'.$cookiehash);
    - setcookie('wordpresspass_'.$cookiehash);
    + setcookie('wordpressuser_'.$cookiehash, " ", time() - 31536000, COOKIEPATH);
    + setcookie('wordpresspass_'.$cookiehash, " ", time() - 31536000, COOKIEPATH);
    header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Cache-Control: no-cache, must-revalidate');

  2. Orange
    Member
    Posted 9 years ago #

    It's worth noting that a/the symptom of this problem is not being able to log in after loging out, without a 'wrong user/password' error message.
    I had that problem just now on my first WP install, so it was great to find a fix for it so quickly.

  3. raincrow
    Member
    Posted 9 years ago #

    Thank you for this patch! Works fine so far.

  4. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    Thanks rread. Patch committed.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.