Skip to:
Content

bbPress.org

Changeset 5305


Ignore:
Timestamp:
03/04/2014 06:06:45 AM (11 years ago)
Author:
nacin
Message:

bbPress 1.x: Allow log-in attempt even if we think the user is already logged in.

If your session cookie's internal expiration time has passed, we give you a grace period of one hour for POST and XHR requests. If within that hour you're trying to log in again, the grace period goes into effect for the POST. Then bb-login.php kicks you out because it thinks you're already logged in, instead of setting a new cookie for you.

So long, heisenbug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1/bb-login.php

    r3896 r5305  
    6666        bb_logout();
    6767
    68     bb_safe_redirect( $re );
    69     exit;
     68    // If POST, assume we're trying to log in. We may be logged in
     69    // simply due to the 1-hour grace period afforded to POST requests.
     70    if ( 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
     71        bb_safe_redirect( $re );
     72        exit;
     73    }
    7074}
    7175
Note: See TracChangeset for help on using the changeset viewer.