From 6e176840c882cfe11152de6350788d74374a54ae Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Tue, 15 Aug 2023 18:58:52 +0200 Subject: feat: move csrf validation out of request Signed-off-by: Daniel Kesselberg --- tests/lib/Security/CSRF/CsrfTokenManagerTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/lib/Security/CSRF/CsrfTokenManagerTest.php') 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)); } -- cgit v1.2.3