fix: CSRF flow ships the raw token, not the HMAC cookie
This commit is contained in:
@@ -30,7 +30,7 @@ final class PostBattlefieldEditorTest extends TestCase
|
||||
$request = $this->buildRequest(
|
||||
rawBody: json_encode($this->validBattlefield(), JSON_THROW_ON_ERROR),
|
||||
csrfHeader: $token,
|
||||
cookies: ['__csrf' => $cookie],
|
||||
cookies: ['__csrf' => $cookie, '__csrf_token' => $token],
|
||||
server: ['__csrf_secret' => self::SECRET],
|
||||
);
|
||||
$response = $handler->handle($request, ['id' => 'demo']);
|
||||
@@ -48,7 +48,7 @@ final class PostBattlefieldEditorTest 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],
|
||||
server: ['__csrf_secret' => self::SECRET],
|
||||
);
|
||||
$response = $handler->handle($request, ['id' => 'demo']);
|
||||
|
||||
Reference in New Issue
Block a user