summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-09-18 18:08:59 +0200
committerGitHub <noreply@github.com>2019-09-18 18:08:59 +0200
commit28794b37826ab6a67f5490df514292da1fcb4201 (patch)
treec5363d467d2b92c761a6db2b609d353c5e03291a
parent3efd9a12d7f3099925d36b7d13abee99d5b948f8 (diff)
parentee76b0fbd27730745ea39e8cdd95ed1f94dc2ebd (diff)
downloadnextcloud-server-28794b37826ab6a67f5490df514292da1fcb4201.tar.gz
nextcloud-server-28794b37826ab6a67f5490df514292da1fcb4201.zip
Merge pull request #17194 from nextcloud/fix/17166/delete-temp-tokens-only-for-current-user
Add uid to delete temp token query
-rw-r--r--lib/private/Authentication/Token/PublicKeyTokenMapper.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Authentication/Token/PublicKeyTokenMapper.php b/lib/private/Authentication/Token/PublicKeyTokenMapper.php
index df91066c44f..62fbf1c6d7a 100644
--- a/lib/private/Authentication/Token/PublicKeyTokenMapper.php
+++ b/lib/private/Authentication/Token/PublicKeyTokenMapper.php
@@ -163,7 +163,8 @@ class PublicKeyTokenMapper extends QBMapper {
$qb = $this->db->getQueryBuilder();
$qb->delete('authtoken')
- ->where($qb->expr()->eq('type', $qb->createNamedParameter(IToken::TEMPORARY_TOKEN)))
+ ->where($qb->expr()->eq('uid', $qb->createNamedParameter($except->getUID())))
+ ->andWhere($qb->expr()->eq('type', $qb->createNamedParameter(IToken::TEMPORARY_TOKEN)))
->andWhere($qb->expr()->neq('id', $qb->createNamedParameter($except->getId())))
->andWhere($qb->expr()->eq('version', $qb->createNamedParameter(PublicKeyToken::VERSION, IQueryBuilder::PARAM_INT)));