From d05f67b2f3eec245ac09ecdbff4dcedbfe7645c3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 10 Jul 2017 14:32:10 +0200 Subject: [PATCH 1/3] properly block file upload to non-active filelist Signed-off-by: Robin Appelman --- apps/files/js/filelist.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index b1e7c3f5f8..45591e5b7a 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -2737,6 +2737,7 @@ if (self.$el.hasClass('hidden')) { // do not upload to invisible lists + e.preventDefault(); return false; } @@ -2748,6 +2749,7 @@ && !self.$el.has(dropTarget).length // dropped inside list && !dropTarget.is(self.$container) // dropped on main container ) { + e.preventDefault(); return false; } From 9e675dd8b178586a69cc2b063ddf0ce928417ba3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 11 Jul 2017 14:01:16 +0200 Subject: [PATCH 2/3] fix test Signed-off-by: Robin Appelman --- apps/files/tests/js/filelistSpec.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index b7ee9c8554..ffb0436104 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -2694,22 +2694,24 @@ describe('OCA.Files.FileList tests', function() { var eventData = { delegatedEvent: { target: $target + }, + preventDefault: function () { } }; uploader.trigger('drop', eventData, data || {}); return !!data.targetDir; } - it('drop on a tr or crumb outside file list does not trigger upload', function() { - var $anotherTable = $('
outside
crumb
'); - var ev; - $('#testArea').append($anotherTable); - ev = dropOn($anotherTable.find('tr'), uploadData); - expect(ev).toEqual(false); + it('drop on a tr or crumb outside file list does not trigger upload', function() { + var $anotherTable = $('
outside
crumb
'); + var ev; + $('#testArea').append($anotherTable); + ev = dropOn($anotherTable.find('tr'), uploadData); + expect(ev).toEqual(false); - ev = dropOn($anotherTable.find('.crumb'), uploadData); - expect(ev).toEqual(false); - }); + ev = dropOn($anotherTable.find('.crumb'), uploadData); + expect(ev).toEqual(false); + }); it('drop on an element outside file list container does not trigger upload', function() { var $anotherEl = $('
outside
'); var ev; From 7da78af4d4d7cf283fca36827120f59a35672010 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 13 Jul 2017 11:47:35 +0200 Subject: [PATCH 3/3] Fix autoloader Signed-off-by: Morris Jobke --- lib/composer/composer/autoload_classmap.php | 1 + lib/composer/composer/autoload_static.php | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index 33b96d29ac..5a77bb7fd4 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -560,6 +560,7 @@ return array( 'OC\\Files\\Cache\\Wrapper\\CacheJail' => $baseDir . '/lib/private/Files/Cache/Wrapper/CacheJail.php', 'OC\\Files\\Cache\\Wrapper\\CachePermissionsMask' => $baseDir . '/lib/private/Files/Cache/Wrapper/CachePermissionsMask.php', 'OC\\Files\\Cache\\Wrapper\\CacheWrapper' => $baseDir . '/lib/private/Files/Cache/Wrapper/CacheWrapper.php', + 'OC\\Files\\Cache\\Wrapper\\JailPropagator' => $baseDir . '/lib/private/Files/Cache/Wrapper/JailPropagator.php', 'OC\\Files\\Config\\CachedMountInfo' => $baseDir . '/lib/private/Files/Config/CachedMountInfo.php', 'OC\\Files\\Config\\LazyStorageMountInfo' => $baseDir . '/lib/private/Files/Config/LazyStorageMountInfo.php', 'OC\\Files\\Config\\MountProviderCollection' => $baseDir . '/lib/private/Files/Config/MountProviderCollection.php', diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index 6f93d83c31..97875daaa6 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -590,6 +590,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Files\\Cache\\Wrapper\\CacheJail' => __DIR__ . '/../../..' . '/lib/private/Files/Cache/Wrapper/CacheJail.php', 'OC\\Files\\Cache\\Wrapper\\CachePermissionsMask' => __DIR__ . '/../../..' . '/lib/private/Files/Cache/Wrapper/CachePermissionsMask.php', 'OC\\Files\\Cache\\Wrapper\\CacheWrapper' => __DIR__ . '/../../..' . '/lib/private/Files/Cache/Wrapper/CacheWrapper.php', + 'OC\\Files\\Cache\\Wrapper\\JailPropagator' => __DIR__ . '/../../..' . '/lib/private/Files/Cache/Wrapper/JailPropagator.php', 'OC\\Files\\Config\\CachedMountInfo' => __DIR__ . '/../../..' . '/lib/private/Files/Config/CachedMountInfo.php', 'OC\\Files\\Config\\LazyStorageMountInfo' => __DIR__ . '/../../..' . '/lib/private/Files/Config/LazyStorageMountInfo.php', 'OC\\Files\\Config\\MountProviderCollection' => __DIR__ . '/../../..' . '/lib/private/Files/Config/MountProviderCollection.php',