Fixed unescaped messages in JSON responses

This commit is contained in:
Matias Griese
2021-11-03 12:42:27 +02:00
parent c8a4a111df
commit 6463135bf0
4 changed files with 33 additions and 23 deletions

View File

@@ -292,7 +292,7 @@ abstract class AbstractController implements RequestHandlerInterface
$response = [
'code' => $code,
'status' => 'error',
'message' => $message
'message' => htmlspecialchars($message, ENT_QUOTES | ENT_HTML5, 'UTF-8')
];
$accept = $this->getAccept(['application/json', 'text/html']);