mirror of https://github.com/MISP/MISP
fix: [API] don't html encode JSON documents
- earlier fix broke shit - sometimes we pass the type as json sometimes as application/json to the response class, which handles it cleanly - but the check only accounted for one casepull/9764/head
parent
33a1eb6640
commit
565b6a68c1
|
@ -648,7 +648,7 @@ class RestResponseComponent extends Component
|
|||
} else {
|
||||
$prettyPrint = !$this->isAutomaticTool(); // Do not pretty print response for automatic tools
|
||||
$response = JsonTool::encode($response, $prettyPrint);
|
||||
if ($format !== 'json') {
|
||||
if ($format !== 'json' && $format !== 'application/json') {
|
||||
$response = h($response);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue