diff options
Diffstat (limited to 'lib/private/lock/memcachelockingprovider.php')
-rw-r--r-- | lib/private/lock/memcachelockingprovider.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/lock/memcachelockingprovider.php b/lib/private/lock/memcachelockingprovider.php index af95200d159..e63e5912982 100644 --- a/lib/private/lock/memcachelockingprovider.php +++ b/lib/private/lock/memcachelockingprovider.php @@ -66,6 +66,9 @@ class MemcacheLockingProvider extends AbstractLockingProvider { * @throws \OCP\Lock\LockedException */ public function acquireLock($path, $type) { + if (strlen($path) > 64) { // max length in file_locks + throw new \InvalidArgumentException("Lock key length too long"); + } if ($type === self::LOCK_SHARED) { if (!$this->memcache->inc($path)) { throw new LockedException($path); |