Skip to content

Commit

Permalink
fix(loginflow): log info about regeneration session ids
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Schiwon <[email protected]>
  • Loading branch information
blizzz committed Aug 2, 2024
1 parent 8dca212 commit da2e375
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/private/Session/CryptoSessionData.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,17 @@ public function reopen(): bool {
* @return void
*/
public function regenerateId(bool $deleteOldSession = true, bool $updateToken = false) {
if ($this->exists('client.flow.v2.state.token') || $this->exists('client.flow.state.token')) {
$key = $this->exists('client.flow.v2.state.token') ? 'client.flow.v2.state.token' : 'client.flow.state.token';
$e = new \Exception();
logger('core')->error('Regenerating session ID', [
'loginFlow' => $key === 'client.flow.v2.state.token' ? 'v2' : 'v1',
'stateToken' => $this->sessionValues[$key],
'deleteOldSessionFile' => $deleteOldSession,
'updateToken' => $updateToken,
'exception' => $e,
]);
}
$this->session->regenerateId($deleteOldSession, $updateToken);
}

Expand Down

0 comments on commit da2e375

Please sign in to comment.