From a9d66562a81d53aff3c07c7217692ecec3aa89f8 Mon Sep 17 00:00:00 2001 From: Emiliano Macedonio Date: Tue, 11 Jun 2024 14:24:34 +0200 Subject: [PATCH] =?UTF-8?q?rollback=20commit=20fc6b196=20[Added=20the=20po?= =?UTF-8?q?ssibility=20of=20sending=20data=20to=20the=20"qso"=20method=20A?= =?UTF-8?q?PI=20also=20in=E2=80=A6]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/Api.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/application/controllers/Api.php b/application/controllers/Api.php index 7bb18b5a..e165f4d8 100644 --- a/application/controllers/Api.php +++ b/application/controllers/Api.php @@ -193,13 +193,8 @@ class API extends CI_Controller { // Decode JSON and store $obj = json_decode(file_get_contents("php://input"), true); if ($obj === NULL) { - // Decoding not valid try simple www-x-form-urlencoded - $objTmp = file_get_contents("php://input"); - parse_str($objTmp, $obj); - if ($obj === NULL) { - echo json_encode(['status' => 'failed', 'reason' => "wrong JSON"]); - die(); - } + echo json_encode(['status' => 'failed', 'reason' => "wrong JSON"]); + die(); } if(!isset($obj['key']) || $this->api_model->authorize($obj['key']) == 0) {