aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2024-04-02 12:58:01 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2024-04-02 12:58:01 +0200
commitec76784cf7b7c103148bdb243e84336b7c98babb (patch)
tree10591a8df9f928c39f4e867b74fd8d0e6feb4bb1
parentad507664b2712fde3c0b3f03d3ce0f6a9d50b232 (diff)
downloadnextcloud-server-fix/auth/authtoken-activity-update-in-transaction.tar.gz
nextcloud-server-fix/auth/authtoken-activity-update-in-transaction.zip
fixup! fix(auth): Log when authtoken activity is updated in a transactionfix/auth/authtoken-activity-update-in-transaction
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r--lib/private/Authentication/Token/PublicKeyTokenProvider.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Authentication/Token/PublicKeyTokenProvider.php b/lib/private/Authentication/Token/PublicKeyTokenProvider.php
index 35b314489a7..89f6fe66703 100644
--- a/lib/private/Authentication/Token/PublicKeyTokenProvider.php
+++ b/lib/private/Authentication/Token/PublicKeyTokenProvider.php
@@ -280,6 +280,9 @@ class PublicKeyTokenProvider implements IProvider {
if (!($token instanceof PublicKeyToken)) {
throw new InvalidTokenException("Invalid token type");
}
+ if ($this->db->inTransaction()) {
+ $this->logger->error('Auth token update is executed in a transaction', ['exception' => new Exception('Auth token update is executed in a transaction')]);
+ }
$this->mapper->update($token);
}