Browse Source

Prevent XSS exploit by checking if path-info is set, thanks to Lukas Reschke

remotes/origin/stable4
Michael Gapczynski 14 years ago
parent
commit
d9fbdae758
  1. 8
      lib/json.php

8
lib/json.php

@ -73,9 +73,11 @@ class OC_JSON{
* Encode and print $data in json format
*/
public static function encodedPrint($data,$setContentType=true){
if($setContentType){
self::setContentTypeHeader();
if(!isset($_SERVER['PATH_INFO'])) {
if($setContentType){
self::setContentTypeHeader();
}
echo json_encode($data);
}
echo json_encode($data);
}
}
Loading…
Cancel
Save