Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Remove double urldecode, creating "+" issues in Rest API.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Feb 2, 2017
1 parent dc573d1 commit c61811d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/src/core/src/pydio/Core/Controller/Controller.php
Expand Up @@ -105,7 +105,8 @@ public static function parseRestParameters(ServerRequestInterface &$request){
$paramNames = explode("/", trim($restPath, "/"));
$exploded = explode("?", $path);
$path = array_shift($exploded);
$paramValues = array_map("urldecode", explode("/", trim($path, "/"), count($paramNames)));
//$paramValues = array_map("urldecode", explode("/", trim($path, "/"), count($paramNames)));
$paramValues = explode("/", trim($path, "/"), count($paramNames));
foreach ($paramNames as $i => $pName) {
if (strpos($pName, "+") !== false) {
$paramNames[$i] = str_replace("+", "", $pName);
Expand All @@ -129,7 +130,7 @@ public static function parseRestParameters(ServerRequestInterface &$request){
* @param ServerRequestInterface $request
* @param ResponseInterface $response
* @param callable|null $nextCallable
* @return ResponseInterface
= strp * @return ResponseInterface
* @throws AuthRequiredException
*/
public static function registryActionMiddleware(ServerRequestInterface $request, ResponseInterface $response, callable $nextCallable = null){
Expand Down

0 comments on commit c61811d

Please sign in to comment.