diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-03-24 10:48:21 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-03-26 17:07:02 +0100 |
commit | 8c903c100ff6517806e5328ef56d615f5c93490b (patch) | |
tree | 720c7b6eeb8cc5b594e33012514a07f174e66352 | |
parent | 268f249e8d98e8b91f51f4d39cfc060efbd5caab (diff) | |
download | nextcloud-server-8c903c100ff6517806e5328ef56d615f5c93490b.tar.gz nextcloud-server-8c903c100ff6517806e5328ef56d615f5c93490b.zip |
check limit of serialized command in unit tests
-rw-r--r-- | lib/private/command/queuebus.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/command/queuebus.php b/lib/private/command/queuebus.php index e5604eb1fef..78712ebd9cd 100644 --- a/lib/private/command/queuebus.php +++ b/lib/private/command/queuebus.php @@ -41,6 +41,9 @@ class QueueBus implements IBus { if ($command instanceof ICommand) { // ensure the command can be serialized $serialized = serialize($command); + if(strlen($serialized) > 4000) { + throw new \InvalidArgumentException('Trying to push a command which serialized form can not be stored in the database (>4000 character)'); + } $unserialized = unserialize($serialized); $unserialized->handle(); } else { |