8000 security #cve-2023-46735 [Webhook] Remove user-submitted type from HT… · jschaedl/symfony@c329f2d · GitHub
[go: up one dir, main page]

Skip to content

Commit c329f2d

Browse files
security #cve-2023-46735 [Webhook] Remove user-submitted type from HTTP response (nicolas-grekas)
This PR was merged into the 6.3 branch.
2 parents d42b5c3 + 8128c30 commit c329f2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Webhook/Controller/WebhookController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct(
3838
public function handle(string $type, Request $request): Response
3939
{
4040
if (!isset($this->parsers[$type])) {
41-
return new Response(sprintf('No parser found for webhook of type "%s".', $type), 404);
41+
return new Response('No webhook parser found for the type given in the URL.', 404, ['Content-Type' => 'text/plain']);
4242
}
4343
/** @var RequestParserInterface $parser */
4444
$parser = $this->parsers[$type]['parser'];

0 commit comments

Comments
 (0)
0