[Pkg-owncloud-commits] [owncloud] 68/103: Use existing IRequest to not read php://input multiple times

David Prévot taffit at moszumanska.debian.org
Sun May 31 12:32:39 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v8.0.4RC1
in repository owncloud.

commit b2903485c0b63f80a6927507ee650fdaae47e999
Author: Lukas Reschke <lukas at owncloud.com>
Date:   Wed May 6 14:23:24 2015 +0200

    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.
---
 lib/private/api.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/private/api.php b/lib/private/api.php
index c58d262..3cdafe9 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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list