Browse Source
Merge pull request #29682 from nextcloud/bugfix/29678/fix-missing-token-update
Fix missing token update
pull/29689/head
Joas Schilling
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
2 deletions
-
lib/private/User/Session.php
-
tests/lib/User/SessionTest.php
|
|
|
@ -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; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -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()) |
|
|
|
|