From 2579042e4c7bb89505dbf8ff115851355275b172 Mon Sep 17 00:00:00 2001 From: bnu Date: Mon, 18 May 2015 17:21:40 +0900 Subject: [PATCH] =?UTF-8?q?PHP=20=ED=98=B8=ED=99=98=EC=84=B1=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0=20-=20$HTTP=5FRAW=5FPOST=5FDATA=20-=20$=5FSERVER['HTT?= =?UTF-8?q?P=5FCONTENT=5FTYPE']?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/context/Context.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 257900cac..612e29e3f 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -1144,8 +1144,8 @@ class Context $self->js_callback_func = $self->getJSCallbackFunc(); ($type && $self->request_method = $type) or - (strpos($_SERVER['CONTENT_TYPE'], 'json') && $self->request_method = 'JSON') or - ($GLOBALS['HTTP_RAW_POST_DATA'] && $self->request_method = 'XMLRPC') or + ((strpos($_SERVER['CONTENT_TYPE'], 'json') || strpos($_SERVER['HTTP_CONTENT_TYPE'], 'json')) && $self->request_method = 'JSON') or + (file_get_contents('php://input') && $self->request_method = 'XMLRPC') or ($self->js_callback_func && $self->request_method = 'JS_CALLBACK') or ($self->request_method = $_SERVER['REQUEST_METHOD']); } @@ -1249,7 +1249,7 @@ class Context } $params = array(); - parse_str($GLOBALS['HTTP_RAW_POST_DATA'], $params); + parse_str(file_get_contents('php://input'), $params); foreach($params as $key => $val) { @@ -1269,7 +1269,7 @@ class Context return; } - $xml = $GLOBALS['HTTP_RAW_POST_DATA']; + $xml = file_get_contents('php://input'); if(Security::detectingXEE($xml)) { header("HTTP/1.0 400 Bad Request"); @@ -1413,7 +1413,7 @@ class Context */ function _setUploadedArgument() { - if($_SERVER['REQUEST_METHOD'] != 'POST' || !$_FILES || stripos($_SERVER['CONTENT_TYPE'], 'multipart/form-data') === FALSE) + if($_SERVER['REQUEST_METHOD'] != 'POST' || !$_FILES || stripos($_SERVER['CONTENT_TYPE'], 'multipart/form-data') === FALSE || stripos($_SERVER['HTTP_CONTENT_TYPE'], 'multipart/form-data') === FALSE) { return; }