diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-11-16 18:31:39 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-12-20 09:38:45 +0300 |
commit | ae2d802a0fba50dcaf85ea8466d02b79f0dd4aa6 (patch) | |
tree | fd2596fac0a7160e5f422cf2c888c1f91a5e0105 /lib | |
parent | cc948a3b3dd945ed2fcfa9bcfd1b072a51b95a50 (diff) |
Check the passed variables
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/OCSController.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Controller/OCSController.php b/lib/Controller/OCSController.php index f747986e..cbb93c73 100644 --- a/lib/Controller/OCSController.php +++ b/lib/Controller/OCSController.php @@ -138,6 +138,10 @@ class OCSController extends \OCP\AppFramework\OCSController { * @param int $template The template id */ public function createFromTemplate($path, $template) { + if ($path === null || $template === null) { + throw new OCSBadRequestException('path and template must be set'); + } + if (!$this->manager->isTemplate($template)) { throw new OCSBadRequestException('Invalid template provided'); } |