summaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2020-10-28 14:07:14 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2020-10-28 14:07:14 +0100
commit1eb86e46fdfaed73d240b3e47b6fe9a36179b3a5 (patch)
treebcff9ec748b5d29c8cc8355dc5d4723cfcb141d8 /apps/workflowengine/lib
parent25f347a49a4ccbe8903de05c9e56d5d0940faf92 (diff)
downloadnextcloud-server-1eb86e46fdfaed73d240b3e47b6fe9a36179b3a5.tar.gz
nextcloud-server-1eb86e46fdfaed73d240b3e47b6fe9a36179b3a5.zip
inform the user when flow config data exceeds thresholds
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/workflowengine/lib')
-rw-r--r--apps/workflowengine/lib/Manager.php9
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']);
}
}