Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0037654

Browse files
committed
minor#20364 [EventDispatcher] Fix XSS in example event dispatcher (nicolas-grekas)
This PR was merged into the 5.4 branch.Discussion----------[EventDispatcher] Fix XSS in example event dispatcherThe exception message can contain unfiltered user input.Commits-------2ff16f8 Fix XSS in example event dispatcher
2 parents44df5e8 +2ff16f8 commit0037654

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎event_dispatcher.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ The most common way to listen to an event is to register an **event listener**::
4141
// Customize your response object to display the exception details
4242
$response = new Response();
4343
$response->setContent($message);
44+
$response->headers->set('Content-Type', 'text/plain; charset=utf-8');
4445

4546
// HttpExceptionInterface is a special type of exception that
4647
// holds status code and header details

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp