diff options
Diffstat (limited to 'apps/workflowengine/lib')
-rw-r--r-- | apps/workflowengine/lib/Manager.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php index c949e7f36f7..87c3c5de6b3 100644 --- a/apps/workflowengine/lib/Manager.php +++ b/apps/workflowengine/lib/Manager.php @@ -492,6 +492,11 @@ class Manager implements IManager { if (count($checks) === 0) { throw new \UnexpectedValueException($this->l->t('At least one check needs to be provided')); } + + if (strlen((string)$operation) > IManager::MAX_OPERATION_VALUE_BYTES) { + throw new \UnexpectedValueException($this->l->t('The provided operation data is too long')); + } + $instance->validateOperation($name, $checks, $operation); foreach ($checks as $check) { @@ -516,6 +521,10 @@ class Manager implements IManager { throw new \UnexpectedValueException($this->l->t('Check %s is not allowed with this entity', [$class])); } + if (strlen((string)$check['value']) > IManager::MAX_CHECK_VALUE_BYTES) { + throw new \UnexpectedValueException($this->l->t('The provided check value is too long')); + } + $instance->validateCheck($check['operator'], $check['value']); } } |