JSON not JS brainfart

This commit is contained in:
divinity76 2022-07-23 09:29:12 +02:00 committed by GitHub
parent 0682f7b10c
commit 7c4e9bad7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1193,7 +1193,7 @@ class UploadHandler
}
if(!headers_sent()){
// this is the most likely/expected path.
header("Content-Type: text/javascript; charset=UTF-8");
header("Content-Type: application/json");
} else {
// html-encode json to prevent xss...
$json = htmlentities($json, ENT_QUOTES | ENT_SUBSTITUTE | ENT_DISALLOWED | ENT_HTML401);