diff options
author | Joas Schilling <coding@schilljs.com> | 2018-11-23 12:38:07 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-11-23 12:39:02 +0100 |
commit | 695e60228d0a2441dcbb3b8512d9b9be4fbfd2d8 (patch) | |
tree | 88032a702566470cf035f8acf1005fa3b5d5c9a8 /lib/private/RichObjectStrings | |
parent | 75c373705408339dc71e5ba6775737b896dd5034 (diff) | |
download | nextcloud-server-695e60228d0a2441dcbb3b8512d9b9be4fbfd2d8.tar.gz nextcloud-server-695e60228d0a2441dcbb3b8512d9b9be4fbfd2d8.zip |
Validate all rich objects not only the used ones
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/RichObjectStrings')
-rw-r--r-- | lib/private/RichObjectStrings/Validator.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/private/RichObjectStrings/Validator.php b/lib/private/RichObjectStrings/Validator.php index 55a50fc2a48..29980885cf8 100644 --- a/lib/private/RichObjectStrings/Validator.php +++ b/lib/private/RichObjectStrings/Validator.php @@ -71,11 +71,17 @@ class Validator implements IValidator { foreach ($matches[1] as $parameter) { if (!isset($parameters[$parameter])) { throw new InvalidObjectExeption('Parameter is undefined'); - } else { - $this->validateParameter($parameters[$parameter]); } } } + + foreach ($parameters as $parameter) { + if (!\is_array($parameter)) { + throw new InvalidObjectExeption('Parameter is malformed'); + } + + $this->validateParameter($parameter); + } } /** |