aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2025-04-09 15:05:27 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2025-04-09 15:05:27 +0200
commitfbfeb042736e571dbdabc066e248fbdfb50d3908 (patch)
tree82e63352fa29ad6ba63b63898cd9e602a643ea6d
parentc285ac0f61ba20ee789428f1446139a7f2261224 (diff)
downloadnextcloud-server-debug/noid/log-reason-token-mismatch-stable29.tar.gz
nextcloud-server-debug/noid/log-reason-token-mismatch-stable29.zip
debug(Session): report keys in session for the observed error casedebug/noid/log-reason-token-mismatch-stable29
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
-rw-r--r--core/Controller/ClientFlowLoginV2Controller.php2
-rw-r--r--lib/private/Session/CryptoSessionData.php4
2 files changed, 6 insertions, 0 deletions
diff --git a/core/Controller/ClientFlowLoginV2Controller.php b/core/Controller/ClientFlowLoginV2Controller.php
index 287a042677d..34baf182a41 100644
--- a/core/Controller/ClientFlowLoginV2Controller.php
+++ b/core/Controller/ClientFlowLoginV2Controller.php
@@ -348,7 +348,9 @@ class ClientFlowLoginV2Controller extends Controller {
logger('core')->error('Client login flow state token is not set', [
'sessionToken' => $currentToken,
'requestToken' => $stateToken,
+ 'entryNamesInSession' => implode(',', method_exists($this->session, 'dumpKeys') ? $this->session->dumpKeys() : ['(unexpected session instance)']),
'loginFlow' => 'v2',
+ 'backingSessionClass' => get_class($this->session),
]);
return false;
}
diff --git a/lib/private/Session/CryptoSessionData.php b/lib/private/Session/CryptoSessionData.php
index b4a78573371..ba31f316cfb 100644
--- a/lib/private/Session/CryptoSessionData.php
+++ b/lib/private/Session/CryptoSessionData.php
@@ -162,6 +162,10 @@ class CryptoSessionData implements \ArrayAccess, ISession {
return null;
}
+ public function dumpKeys(): array {
+ return array_keys($this->sessionValues);
+ }
+
/**
* Check if a named key exists in the session
*