diff --git a/lib/private/backgroundjob/joblist.php b/lib/private/backgroundjob/joblist.php index 4011572f62e5d65bb61cf193686f0dde405c06b3..95a7b1258010af913356fa94e0ec9a79e0c57010 100644 --- a/lib/private/backgroundjob/joblist.php +++ b/lib/private/backgroundjob/joblist.php @@ -57,6 +57,9 @@ class JobList implements IJobList { $class = $job; } $argument = json_encode($argument); + if (strlen($argument) > 2048) { + throw new \InvalidArgumentException('Background job arguments cant exceed 2048 characters (json encoded'); + } $query = $this->conn->prepare('INSERT INTO `*PREFIX*jobs`(`class`, `argument`, `last_run`) VALUES(?, ?, 0)'); $query->execute(array($class, $argument)); }