summaryrefslogtreecommitdiff
path: root/includes/controller/user_worklog_controller.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2020-01-09 13:43:10 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2020-01-09 13:43:10 +0100
commit94753bc3d866071980148a2fd9e1bd5fa72b7a13 (patch)
tree1ec4dbea528c4730d0d56b08d84a62df8df62710 /includes/controller/user_worklog_controller.php
parent74cf8d1e69721fd0aaf003b620d47288c8a37222 (diff)
Worklog: Limit worklog comment length to 200 as it is configured in the database
Diffstat (limited to 'includes/controller/user_worklog_controller.php')
-rw-r--r--includes/controller/user_worklog_controller.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/controller/user_worklog_controller.php b/includes/controller/user_worklog_controller.php
index 6b100338..5bb07f33 100644
--- a/includes/controller/user_worklog_controller.php
+++ b/includes/controller/user_worklog_controller.php
@@ -93,6 +93,11 @@ function user_worklog_from_request($userWorkLog)
error(__('Please enter a comment.'));
}
+ if (mb_strlen($userWorkLog['comment']) > 200) {
+ $valid = false;
+ error(__('Comment too long.'));
+ }
+
return [
$valid,
$userWorkLog