mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 03:15:56 +00:00
api: disable deprecated HTTP parameter support by default
This commit is contained in:
@@ -29,11 +29,17 @@
|
|||||||
|
|
||||||
$input = file_get_contents("php://input");
|
$input = file_get_contents("php://input");
|
||||||
|
|
||||||
// Override $_REQUEST with JSON-encoded data if available
|
if (defined('_API_DEBUG_HTTP_ENABLED') && _API_DEBUG_HTTP_ENABLED) {
|
||||||
if ($input) {
|
// 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);
|
$input = json_decode($input, true);
|
||||||
|
$_REQUEST = $input;
|
||||||
if ($input) $_REQUEST = $input;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_REQUEST["sid"]) {
|
if ($_REQUEST["sid"]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user