aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Security/CSRF/CsrfTokenManagerTest.php
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2023-08-15 18:58:52 +0200
committerDaniel Kesselberg <mail@danielkesselberg.de>2024-08-14 15:41:27 +0200
commit6e176840c882cfe11152de6350788d74374a54ae (patch)
tree36c324e1d646051ba36988094fdeb28371e39f1d /tests/lib/Security/CSRF/CsrfTokenManagerTest.php
parent0f10cabf2a7ff6652f7b29e81f3682fac941e647 (diff)
downloadnextcloud-server-dept-remove-csrf-dependency-from-request.tar.gz
nextcloud-server-dept-remove-csrf-dependency-from-request.zip
feat: move csrf validation out of requestdept-remove-csrf-dependency-from-request
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'tests/lib/Security/CSRF/CsrfTokenManagerTest.php')
-rw-r--r--tests/lib/Security/CSRF/CsrfTokenManagerTest.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/Security/CSRF/CsrfTokenManagerTest.php b/tests/lib/Security/CSRF/CsrfTokenManagerTest.php
index c4fd480654d..8c19bc6e82d 100644
--- a/tests/lib/Security/CSRF/CsrfTokenManagerTest.php
+++ b/tests/lib/Security/CSRF/CsrfTokenManagerTest.php
@@ -131,14 +131,14 @@ class CsrfTokenManagerTest extends \Test\TestCase {
$xorB64 = 'BQcF';
$tokenVal = sprintf('%s:%s', $xorB64, base64_encode($a));
$this->storageInterface
- ->expects($this->once())
- ->method('hasToken')
- ->willReturn(true);
+ ->expects($this->once())
+ ->method('hasToken')
+ ->willReturn(true);
$token = new \OC\Security\CSRF\CsrfToken($tokenVal);
$this->storageInterface
- ->expects($this->once())
- ->method('getToken')
- ->willReturn($b);
+ ->expects($this->once())
+ ->method('getToken')
+ ->willReturn($b);
$this->assertSame(true, $this->csrfTokenManager->isTokenValid($token));
}