Commit 053cbadd authored by Mattias Michaux's avatar Mattias Michaux Committed by Seamus Lee

replaced removed HTTP_RAW_POST_DATA with php input stream

parent cf1d34ab
......@@ -4620,12 +4620,9 @@ LEFT JOIN civicrm_contact {$field['alias']} ON {$field['alias']}.id = {$this->_a
// upload strictly for '.png' images
$name = trim(basename(CRM_Utils_Request::retrieve('name', 'String', CRM_Core_DAO::$_nullObject, FALSE, NULL, 'GET')));
if (preg_match('/\.png$/', $name)) {
//
// POST data is usually string data, but we are passing a RAW .png
// so PHP is a bit confused and $_POST is empty. But it has saved
// the raw bits into $HTTP_RAW_POST_DATA
//
$httpRawPostData = $GLOBALS['HTTP_RAW_POST_DATA'];
// Get the RAW .png from the input.
$httpRawPostData = file_get_contents("php://input");
// prepare the directory
$config = CRM_Core_Config::singleton();
......
......@@ -25,14 +25,6 @@
+--------------------------------------------------------------------+
*/
// Patch for CRM-3154
if (phpversion() == "5.2.2" &&
!isset($GLOBALS['HTTP_RAW_POST_DATA'])
) {
$GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents('php://input');
}
if (defined('PANTHEON_ENVIRONMENT')) {
ini_set('session.save_handler', 'files');
}
......
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