summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-05-06 14:23:24 +0200
committerLukas Reschke <lukas@owncloud.com>2015-05-06 14:23:24 +0200
commitb2903485c0b63f80a6927507ee650fdaae47e999 (patch)
treedef95e8257e29b23264970485396137a864e1161
parentdf9de417674d176f884ddd92e30abac7f9aa9d65 (diff)
downloadnextcloud-server-b2903485c0b63f80a6927507ee650fdaae47e999.tar.gz
nextcloud-server-b2903485c0b63f80a6927507ee650fdaae47e999.zip
Use existing IRequest to not read php://input multiple times
Fixes https://github.com/owncloud/client/issues/3204#issuecomment-99427563 - the firewall app has instantiiated an IRequest before and thus broke a lot of stuff on < PHP 5.6.
-rw-r--r--lib/private/api.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/api.php b/lib/private/api.php
index c58d2620684..3cdafe9af11 100644
--- a/lib/private/api.php
+++ b/lib/private/api.php
@@ -86,9 +86,9 @@ class OC_API {
public static function call($parameters) {
// Prepare the request variables
if($_SERVER['REQUEST_METHOD'] == 'PUT') {
- parse_str(file_get_contents("php://input"), $parameters['_put']);
+ $parameters['_put'] = \OC::$server->getRequest()->getParams();
} else if($_SERVER['REQUEST_METHOD'] == 'DELETE') {
- parse_str(file_get_contents("php://input"), $parameters['_delete']);
+ $parameters['_delete'] = \OC::$server->getRequest()->getParams();
}
$name = $parameters['_route'];
// Foreach registered action