Skip to content
Snippets Groups Projects
Commit d9fbdae7 authored by Michael Gapczynski's avatar Michael Gapczynski
Browse files

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

parent e3f452cf
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment