Fix invalid key warning in CookieSessionProvider error handling code
Change-Id: I68172ff5fcd6acaab7ecf298ed4a47f23cb8c9f7
This commit is contained in:
parent
e089a5c023
commit
0b54186340
1 changed files with 6 additions and 6 deletions
|
|
@ -103,15 +103,15 @@ class CookieSessionProvider extends SessionProvider {
|
|||
}
|
||||
|
||||
public function provideSessionInfo( WebRequest $request ) {
|
||||
$sessionId = $this->getCookie( $request, $this->params['sessionName'], '' );
|
||||
$info = array(
|
||||
'id' => $this->getCookie( $request, $this->params['sessionName'], '' ),
|
||||
'provider' => $this,
|
||||
'forceHTTPS' => $this->getCookie( $request, 'forceHTTPS', '', false )
|
||||
);
|
||||
if ( !SessionManager::validateSessionId( $info['id'] ) ) {
|
||||
unset( $info['id'] );
|
||||
if ( SessionManager::validateSessionId( $sessionId ) ) {
|
||||
$info['id'] = $sessionId;
|
||||
$info['persisted'] = true;
|
||||
}
|
||||
$info['persisted'] = isset( $info['id'] );
|
||||
|
||||
list( $userId, $userName, $token ) = $this->getUserInfoFromCookies( $request );
|
||||
if ( $userId !== null ) {
|
||||
|
|
@ -126,7 +126,7 @@ class CookieSessionProvider extends SessionProvider {
|
|||
$this->logger->warning(
|
||||
'Session "{session}" requested with mismatched UserID and UserName cookies.',
|
||||
array(
|
||||
'session' => $info['id'],
|
||||
'session' => $sessionId,
|
||||
'mismatch' => array(
|
||||
'userid' => $userId,
|
||||
'cookie_username' => $userName,
|
||||
|
|
@ -141,7 +141,7 @@ class CookieSessionProvider extends SessionProvider {
|
|||
$this->logger->warning(
|
||||
'Session "{session}" requested with invalid Token cookie.',
|
||||
array(
|
||||
'session' => $info['id'],
|
||||
'session' => $sessionId,
|
||||
'userid' => $userId,
|
||||
'username' => $userInfo->getName(),
|
||||
) );
|
||||
|
|
|
|||
Loading…
Reference in a new issue