]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add uid to delete temp token query 17197/head
authorDaniel Kesselberg <mail@danielkesselberg.de>
Wed, 18 Sep 2019 14:52:42 +0000 (16:52 +0200)
committerBackportbot <backportbot-noreply@rullzer.com>
Wed, 18 Sep 2019 16:12:13 +0000 (16:12 +0000)
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
lib/private/Authentication/Token/PublicKeyTokenMapper.php

index df91066c44fd5241501dc7954a27509fe9846504..62fbf1c6d7a4091d0ce28db3793aca9f5a351cde 100644 (file)
@@ -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)));