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

Commit

Permalink
[API]check if the JSON is a good one
Browse files Browse the repository at this point in the history
  • Loading branch information
isma91 committed Sep 7, 2016
1 parent 0a0ff2d commit 5cf4f2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/plugins/access.ajxp_conf/src/RepositoriesManager.php
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5cf4f2e

Please sign in to comment.