Browse Source

Merge pull request #29682 from nextcloud/bugfix/29678/fix-missing-token-update

Fix missing token update
tags/v24.0.0beta1
Joas Schilling 2 years ago
parent
commit
f9f02ef45c
No account linked to committer's email address
2 changed files with 4 additions and 2 deletions
  1. 2
    0
      lib/private/User/Session.php
  2. 2
    2
      tests/lib/User/SessionTest.php

+ 2
- 0
lib/private/User/Session.php View File

@@ -750,6 +750,7 @@ class Session implements IUserSession, Emitter {
}

$dbToken->setLastCheck($now);
$this->tokenProvider->updateToken($dbToken);
return true;
}

@@ -767,6 +768,7 @@ class Session implements IUserSession, Emitter {
}

$dbToken->setLastCheck($now);
$this->tokenProvider->updateToken($dbToken);
return true;
}


+ 2
- 2
tests/lib/User/SessionTest.php View File

@@ -1264,7 +1264,7 @@ class SessionTest extends \Test\TestCase {
$mapper->expects($this->any())
->method('getToken')
->willReturn($token);
$mapper->expects($this->once())
$mapper->expects($this->exactly(2))
->method('update');
$request
->expects($this->any())
@@ -1314,7 +1314,7 @@ class SessionTest extends \Test\TestCase {
$mapper->expects($this->any())
->method('getToken')
->willReturn($token);
$mapper->expects($this->never())
$mapper->expects($this->once())
->method('update');
$request
->expects($this->any())

Loading…
Cancel
Save