fix: CSRF flow ships the raw token, not the HMAC cookie
This commit is contained in:
1 parent
73254cbf80
commit
2ea8cfd83d
13 files changed
+60
-28
No files matched your search
@@ -29,7 +29,7 @@ final class PostStartMatchTest extends TestCase
|
||||
$request = $this->buildRequest(
|
||||
rawBody: json_encode($this->validScenario(), JSON_THROW_ON_ERROR),
|
||||
csrfHeader: $token,
|
||||
cookies: ['__csrf' => $cookie],
|
||||
cookies: ['__csrf' => $cookie, '__csrf_token' => $token],
|
||||
);
|
||||
$response = $handler->handle($request, ['id' => 'demo']);
|
||||
|
||||
@@ -51,7 +51,7 @@ final class PostStartMatchTest extends TestCase
|
||||
$request = $this->buildRequest(
|
||||
rawBody: json_encode(['this' => 'is not a valid scenario'], JSON_THROW_ON_ERROR),
|
||||
csrfHeader: $token,
|
||||
cookies: ['__csrf' => $cookie],
|
||||
cookies: ['__csrf' => $cookie, '__csrf_token' => $token],
|
||||
);
|
||||
$response = $handler->handle($request, ['id' => 'demo']);
|
||||
|
||||
@@ -65,7 +65,7 @@ final class PostStartMatchTest extends TestCase
|
||||
$request = $this->buildRequest(
|
||||
rawBody: json_encode($this->validScenario(), JSON_THROW_ON_ERROR),
|
||||
csrfHeader: $token,
|
||||
cookies: ['__csrf' => $cookie],
|
||||
cookies: ['__csrf' => $cookie, '__csrf_token' => $token],
|
||||
);
|
||||
$response = $handler->handle($request, ['id' => 'demo']);
|
||||
|
||||
|
||||
Reference in new issue
Block a user