From 3cf237df67008da8878fff28a2d6b4ad77288ad9 Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind@owncloud.com>
Date: Mon, 23 Feb 2015 18:07:13 +0100
Subject: [PATCH] set max argument length to 4000

---
 db_structure.xml                      | 2 +-
 lib/private/backgroundjob/joblist.php | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/db_structure.xml b/db_structure.xml
index 9f8cfdce4c..142661ba42 100644
--- a/db_structure.xml
+++ b/db_structure.xml
@@ -979,7 +979,7 @@
 				<type>text</type>
 				<default></default>
 				<notnull>true</notnull>
-				<length>2048</length>
+				<length>4000</length>
 			</field>
 
 			<field>
diff --git a/lib/private/backgroundjob/joblist.php b/lib/private/backgroundjob/joblist.php
index 95a7b12580..ded269dfe5 100644
--- a/lib/private/backgroundjob/joblist.php
+++ b/lib/private/backgroundjob/joblist.php
@@ -57,7 +57,7 @@ class JobList implements IJobList {
 				$class = $job;
 			}
 			$argument = json_encode($argument);
-			if (strlen($argument) > 2048) {
+			if (strlen($argument) > 4000) {
 				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)');
-- 
GitLab