Skip to content

Commit

Permalink
Always remove XSRF-TOKEN cookie value before sending to Sentry (#920)
Browse files Browse the repository at this point in the history
  • Loading branch information
stayallive authored Jul 15, 2024
1 parent ad29e34 commit f987314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Sentry/Laravel/Http/LaravelRequestFetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function fetchRequest(): ?ServerRequestInterface
$cookies = new Collection($request->getCookieParams());

// We need to filter out the cookies that are not allowed to be sent to Sentry because they are very sensitive
$forbiddenCookies = [config('session.cookie'), 'remember_*'];
$forbiddenCookies = [config('session.cookie'), 'remember_*', 'XSRF-TOKEN'];

return $request->withCookieParams(
$cookies->map(function ($value, string $key) use ($forbiddenCookies) {
Expand Down

0 comments on commit f987314

Please sign in to comment.