Commit 6eaf3193 authored by Andrew Dolgov's avatar Andrew Dolgov

api: disable deprecated HTTP parameter support by default

parent 369dbc19
......@@ -29,11 +29,17 @@
$input = file_get_contents("php://input");
// Override $_REQUEST with JSON-encoded data if available
if ($input) {
if (defined('_API_DEBUG_HTTP_ENABLED') && _API_DEBUG_HTTP_ENABLED) {
// Override $_REQUEST with JSON-encoded data if available
// fallback on HTTP parameters
if ($input) {
$input = json_decode($input, true);
if ($input) $_REQUEST = $input;
}
} else {
// Accept JSON only
$input = json_decode($input, true);
if ($input) $_REQUEST = $input;
$_REQUEST = $input;
}
if ($_REQUEST["sid"]) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment