Permalink
Browse files

[API]check if the JSON is a good one

  • Loading branch information...
1 parent 0a0ff2d commit 5cf4f2e9bd08458aae3c7251182f85e44b1cd416 @isma91 isma91 committed Sep 7, 2016
Showing with 3 additions and 0 deletions.
  1. +3 −0 core/src/plugins/access.ajxp_conf/src/RepositoriesManager.php
@@ -222,6 +222,9 @@ public function repositoriesActions(ServerRequestInterface $requestInterface, Re
case "post_repository":
$jsonDataCreateWorkspace = json_decode($httpVars["payload"], true);
+ if ($jsonDataCreateWorkspace === null) {
+ throw new PydioException("Invalid JSON !!");
+ }
if(!isSet($jsonDataCreateWorkspace["isTemplate"])) {
$jsonDataCreateWorkspace["isTemplate"] = false;
}

0 comments on commit 5cf4f2e

Please sign in to comment.