docker-vulnerable-dvwa/dvwa/vulnerabilities/csp/source/jsonp.php

14 lines
247 B
PHP
Raw Normal View History

2018-10-12 15:49:58 +00:00
<?php
header("Content-Type: application/json; charset=UTF-8");
if (array_key_exists ("callback", $_GET)) {
$callback = $_GET['callback'];
} else {
return "";
}
$outp = array ("answer" => "15");
echo $callback . "(".json_encode($outp).")";
?>