From a8f7af420277ff6cf4b070af08a5bb62fdbfb470 Mon Sep 17 00:00:00 2001 From: Jannik Stehle Date: Tue, 4 May 2021 14:35:21 +0200 Subject: [PATCH 1/4] Don't return files when accessing a share files drop --- appinfo/application.php | 6 ++++-- controller/filescontroller.php | 20 ++++++++++++++++++- tests/unit/controller/FilesControllerTest.php | 10 +++++++++- .../controller/FilesPublicControllerTest.php | 3 ++- 4 files changed, 34 insertions(+), 5 deletions(-) diff --git a/appinfo/application.php b/appinfo/application.php index 2232d78bb1..0b53c684c7 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -126,7 +126,8 @@ public function __construct(array $urlParams = []) { $c->query('ConfigService'), $c->query('SearchMediaService'), $c->query('DownloadService'), - $c->query('Logger') + $c->query('Logger'), + $c->query('OCP\Share\IManager') ); } ); @@ -140,7 +141,8 @@ public function __construct(array $urlParams = []) { $c->query('ConfigService'), $c->query('SearchMediaService'), $c->query('DownloadService'), - $c->query('Logger') + $c->query('Logger'), + $c->query('OCP\Share\IManager') ); } ); diff --git a/controller/filescontroller.php b/controller/filescontroller.php index e61f3800de..1fabea1b26 100644 --- a/controller/filescontroller.php +++ b/controller/filescontroller.php @@ -26,6 +26,7 @@ use OCA\Gallery\Service\SearchMediaService; use OCA\Gallery\Service\DownloadService; use OCA\Gallery\Service\ServiceException; +use OCP\Share\IManager; /** * Class FilesController @@ -39,6 +40,9 @@ class FilesController extends Controller { /** @var IURLGenerator */ private $urlGenerator; + /** @var IManager */ + private $shareManager; + /** * Constructor * @@ -50,6 +54,7 @@ class FilesController extends Controller { * @param SearchMediaService $searchMediaService * @param DownloadService $downloadService * @param ILogger $logger + * @param IManager $shareManager */ public function __construct( $appName, @@ -59,7 +64,8 @@ public function __construct( ConfigService $configService, SearchMediaService $searchMediaService, DownloadService $downloadService, - ILogger $logger + ILogger $logger, + IManager $shareManager ) { parent::__construct($appName, $request); @@ -69,6 +75,7 @@ public function __construct( $this->searchMediaService = $searchMediaService; $this->downloadService = $downloadService; $this->logger = $logger; + $this->shareManager = $shareManager; } /** @@ -93,6 +100,17 @@ public function __construct( public function getList($location, $features, $etag, $mediatypes) { $featuresArray = \explode(';', $features); $mediaTypesArray = \explode(';', $mediatypes); + + $token = $this->request->getParam('token'); + if ($token) { + $share = $this->shareManager->getShareByToken($token); + + // Prevent user to see directory content if share is a file drop + if ($share->getPermissions() === \OCP\Constants::PERMISSION_CREATE) { + return $this->formatResults([], [], [], "", ""); + } + } + try { return $this->getFilesAndAlbums($location, $featuresArray, $etag, $mediaTypesArray); } catch (\Exception $exception) { diff --git a/tests/unit/controller/FilesControllerTest.php b/tests/unit/controller/FilesControllerTest.php index 437c573ba6..3233d6b875 100644 --- a/tests/unit/controller/FilesControllerTest.php +++ b/tests/unit/controller/FilesControllerTest.php @@ -31,6 +31,7 @@ use OCA\Gallery\Service\SearchMediaService; use OCA\Gallery\Service\DownloadService; use OCA\Gallery\Service\NotFoundServiceException; +use OCP\Share\IManager; /** * Class FilesControllerTest @@ -60,6 +61,8 @@ class FilesControllerTest extends \Test\GalleryUnitTest { protected $downloadService; /** @var ILogger */ protected $logger; + /** @var IManager */ + protected $shareManager; /** * Test set up @@ -94,6 +97,10 @@ public function setUp(): void { $this->logger = $this->getMockBuilder('\OCP\ILogger') ->disableOriginalConstructor() ->getMock(); + $this->shareManager = $this->getMockBuilder('\OCP\Share\IManager') + ->disableOriginalConstructor() + ->getMock(); + $this->controller = new FilesController( $this->appName, $this->request, @@ -102,7 +109,8 @@ public function setUp(): void { $this->configService, $this->searchMediaService, $this->downloadService, - $this->logger + $this->logger, + $this->shareManager ); } diff --git a/tests/unit/controller/FilesPublicControllerTest.php b/tests/unit/controller/FilesPublicControllerTest.php index 2bc5e63e4a..96ad5a5a8d 100644 --- a/tests/unit/controller/FilesPublicControllerTest.php +++ b/tests/unit/controller/FilesPublicControllerTest.php @@ -30,7 +30,8 @@ public function setUp(): void { $this->configService, $this->searchMediaService, $this->downloadService, - $this->logger + $this->logger, + $this->shareManager ); } } From da93f6a67e407dbd223998c183c3e103b6a32f35 Mon Sep 17 00:00:00 2001 From: Jannik Stehle Date: Tue, 4 May 2021 14:56:19 +0200 Subject: [PATCH 2/4] Add unit test, add check for the API controller also --- appinfo/application.php | 3 +- controller/filesapicontroller.php | 20 ++++++++++- .../controller/FilesApiControllerTest.php | 3 +- tests/unit/controller/FilesControllerTest.php | 33 +++++++++++++++++++ 4 files changed, 56 insertions(+), 3 deletions(-) diff --git a/appinfo/application.php b/appinfo/application.php index 0b53c684c7..595b0619db 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -156,7 +156,8 @@ public function __construct(array $urlParams = []) { $c->query('ConfigService'), $c->query('SearchMediaService'), $c->query('DownloadService'), - $c->query('Logger') + $c->query('Logger'), + $c->query('OCP\Share\IManager') ); } ); diff --git a/controller/filesapicontroller.php b/controller/filesapicontroller.php index 517107c18b..02680b4e13 100644 --- a/controller/filesapicontroller.php +++ b/controller/filesapicontroller.php @@ -26,6 +26,7 @@ use OCA\Gallery\Service\SearchMediaService; use OCA\Gallery\Service\DownloadService; use OCA\Gallery\Service\ServiceException; +use OCP\Share\IManager; /** * Class FilesApiController @@ -39,6 +40,9 @@ class FilesApiController extends ApiController { /** @var IURLGenerator */ private $urlGenerator; + /** @var IManager */ + private $shareManager; + /** * Constructor * @@ -50,6 +54,7 @@ class FilesApiController extends ApiController { * @param SearchMediaService $searchMediaService * @param DownloadService $downloadService * @param ILogger $logger + * @param IManager $shareManager */ public function __construct( $appName, @@ -59,7 +64,8 @@ public function __construct( ConfigService $configService, SearchMediaService $searchMediaService, DownloadService $downloadService, - ILogger $logger + ILogger $logger, + IManager $shareManager ) { parent::__construct($appName, $request); @@ -69,6 +75,7 @@ public function __construct( $this->searchMediaService = $searchMediaService; $this->downloadService = $downloadService; $this->logger = $logger; + $this->shareManager = $shareManager; } /** @@ -90,6 +97,17 @@ public function __construct( public function getList($location, $features, $etag, $mediatypes) { $featuresArray = \explode(';', $features); $mediaTypesArray = \explode(';', $mediatypes); + + $token = $this->request->getParam('token'); + if ($token) { + $share = $this->shareManager->getShareByToken($token); + + // Prevent user to see directory content if share is a file drop + if ($share->getPermissions() === \OCP\Constants::PERMISSION_CREATE) { + return $this->formatResults([], [], [], "", ""); + } + } + try { return $this->getFilesAndAlbums($location, $featuresArray, $etag, $mediaTypesArray); } catch (\Exception $exception) { diff --git a/tests/unit/controller/FilesApiControllerTest.php b/tests/unit/controller/FilesApiControllerTest.php index fc15b82a1c..04af6fe9bd 100644 --- a/tests/unit/controller/FilesApiControllerTest.php +++ b/tests/unit/controller/FilesApiControllerTest.php @@ -35,7 +35,8 @@ public function setUp(): void { $this->configService, $this->searchMediaService, $this->downloadService, - $this->logger + $this->logger, + $this->shareManager ); } diff --git a/tests/unit/controller/FilesControllerTest.php b/tests/unit/controller/FilesControllerTest.php index 3233d6b875..7d23c6f0db 100644 --- a/tests/unit/controller/FilesControllerTest.php +++ b/tests/unit/controller/FilesControllerTest.php @@ -32,6 +32,7 @@ use OCA\Gallery\Service\DownloadService; use OCA\Gallery\Service\NotFoundServiceException; use OCP\Share\IManager; +use OCP\Share\IShare; /** * Class FilesControllerTest @@ -318,6 +319,38 @@ public function testGetReducedPath($file, $fixedPath, $folderPathFromRoot) { $this->assertEquals($fixedPath, $response); } + public function testGetFilesWithFileDropShare() { + $location = 'folder'; + $etag = 1111222233334444; + $features = ''; + $mediatypes = 'image/png'; + + $this->request->expects($this->once()) + ->method('getParam') + ->willReturn('param'); + + $shareMock = $this->createMock(IShare::class); + $shareMock->expects($this->once()) + ->method('getPermissions') + ->willReturn(\OCP\Constants::PERMISSION_CREATE); + + $this->shareManager->expects($this->once()) + ->method('getShareByToken') + ->willReturn($shareMock); + + $response = $this->controller->getList($location, $features, $etag, $mediatypes); + + $expectedResponse = [ + 'files' => [], + 'albums' => [], + 'albumconfig' => [], + 'albumpath' => "", + 'updated' => "" + ]; + + $this->assertEquals($expectedResponse, $response); + } + /** * Mocks IURLGenerator->linkToRoute * From adabf4227f3da838bbdb360e055802f2a56dedb6 Mon Sep 17 00:00:00 2001 From: Jannik Stehle Date: Mon, 10 May 2021 14:17:36 +0200 Subject: [PATCH 3/4] Optimize permission check --- .DS_Store | Bin 0 -> 6148 bytes .phpunit.result.cache | 1 + controller/filesapicontroller.php | 2 +- controller/filescontroller.php | 2 +- 4 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .DS_Store create mode 100644 .phpunit.result.cache diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..15105b99f7158ce88daa9e5b1d2faf1a4ef310f3 GIT binary patch literal 6148 zcmeHK%}T>S5T2<;TI-=lk9!tH`UbH?@F?^JBu4z9ZHl0H%+&`Gd;w416ko_E@SB~X zO`4Y8L}dnMzs>AScJgJ(WQd4|_xXURPedK4V5^H^g~+;SLt18$MUM9<=x%&97+n;T zS;N~6zmWlXciZ$pmo%lEmfzpY+0pX)q)5|jTx76!_Pg)BxA1Y?^vO5+%&r&bgm>d{ z*{SA1hm_F`O>5`r^!XEet@Nwr_4IXc`>J`Z@m=J%$+wy(J^HZ*|1QpeGw}BrK+P8E z^b~z`2AlzBV9tPi9|BY`F)S71rvpQ50f23oqhKz*gv12H#IRJv3WPNjsG)2v25UI% z!Tb`#Qc=T+t@&WvnXN4AdFe(#yWo|C9Coe?7>roB?OxUopV# zbd(P9NLE`L4=1%YK+mBf;#VrpLokV@7`{@9_n=W=4>AEJhNU7b5dRT~H2B~Q{3rw8 D_JmUK literal 0 HcmV?d00001 diff --git a/.phpunit.result.cache b/.phpunit.result.cache new file mode 100644 index 0000000000..69795cc726 --- /dev/null +++ b/.phpunit.result.cache @@ -0,0 +1 @@ +C:37:"PHPUnit\Runner\DefaultTestResultCache":21779:{a:2:{s:7:"defects";a:0:{}s:5:"times";a:235:{s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFeaturesList with data set #0";d:0.008;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFeaturesList with data set #1";d:0.003;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFeaturesList with data set #2";d:0.003;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFeaturesList with data set #3";d:0.002;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFeaturesList with data set #4";d:0.003;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFeaturesList with data set #5";d:0.002;s:72:"OCA\Gallery\Config\ConfigParserTest::testGetFeaturesListWithBrokenConfig";d:0.002;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFolderConfig with data set #0";d:0.003;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFolderConfig with data set #1";d:0.003;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFolderConfig with data set #2";d:0.003;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFolderConfig with data set #3";d:0.003;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFolderConfig with data set #4";d:0.002;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFolderConfig with data set #5";d:0.002;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFolderConfig with data set #6";d:0.002;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFolderConfig with data set #7";d:0.002;s:73:"OCA\Gallery\Config\ConfigValidatorTest::testIsConfigSafe with data set #0";d:0;s:73:"OCA\Gallery\Config\ConfigValidatorTest::testIsConfigSafe with data set #1";d:0;s:73:"OCA\Gallery\Config\ConfigValidatorTest::testIsConfigSafe with data set #2";d:0;s:73:"OCA\Gallery\Config\ConfigValidatorTest::testIsConfigSafe with data set #3";d:0;s:73:"OCA\Gallery\Config\ConfigValidatorTest::testIsConfigSafe with data set #4";d:0;s:73:"OCA\Gallery\Config\ConfigValidatorTest::testIsConfigSafe with data set #5";d:0;s:73:"OCA\Gallery\Config\ConfigValidatorTest::testIsConfigSafe with data set #6";d:0;s:73:"OCA\Gallery\Config\ConfigValidatorTest::testIsConfigSafe with data set #7";d:0;s:73:"OCA\Gallery\Config\ConfigValidatorTest::testIsConfigSafe with data set #8";d:0;s:78:"OCA\Gallery\Controller\ConfigApiControllerTest::testGetConfig with data set #0";d:0.002;s:78:"OCA\Gallery\Controller\ConfigApiControllerTest::testGetConfig with data set #1";d:0;s:78:"OCA\Gallery\Controller\ConfigApiControllerTest::testGetConfig with data set #2";d:0;s:78:"OCA\Gallery\Controller\ConfigApiControllerTest::testGetConfig with data set #3";d:0;s:78:"OCA\Gallery\Controller\ConfigApiControllerTest::testGetConfig with data set #4";d:0;s:78:"OCA\Gallery\Controller\ConfigApiControllerTest::testGetConfig with data set #5";d:0;s:67:"OCA\Gallery\Controller\ConfigApiControllerTest::testCannotGetConfig";d:0;s:77:"OCA\Gallery\Controller\ConfigApiControllerTest::testGetConfigWithBrokenSystem";d:0.001;s:75:"OCA\Gallery\Controller\ConfigControllerTest::testGetConfig with data set #0";d:0;s:75:"OCA\Gallery\Controller\ConfigControllerTest::testGetConfig with data set #1";d:0;s:75:"OCA\Gallery\Controller\ConfigControllerTest::testGetConfig with data set #2";d:0;s:75:"OCA\Gallery\Controller\ConfigControllerTest::testGetConfig with data set #3";d:0;s:75:"OCA\Gallery\Controller\ConfigControllerTest::testGetConfig with data set #4";d:0;s:75:"OCA\Gallery\Controller\ConfigControllerTest::testGetConfig with data set #5";d:0;s:64:"OCA\Gallery\Controller\ConfigControllerTest::testCannotGetConfig";d:0;s:74:"OCA\Gallery\Controller\ConfigControllerTest::testGetConfigWithBrokenSystem";d:0;s:81:"OCA\Gallery\Controller\ConfigPublicControllerTest::testGetConfig with data set #0";d:0;s:81:"OCA\Gallery\Controller\ConfigPublicControllerTest::testGetConfig with data set #1";d:0;s:81:"OCA\Gallery\Controller\ConfigPublicControllerTest::testGetConfig with data set #2";d:0;s:81:"OCA\Gallery\Controller\ConfigPublicControllerTest::testGetConfig with data set #3";d:0;s:81:"OCA\Gallery\Controller\ConfigPublicControllerTest::testGetConfig with data set #4";d:0;s:81:"OCA\Gallery\Controller\ConfigPublicControllerTest::testGetConfig with data set #5";d:0;s:70:"OCA\Gallery\Controller\ConfigPublicControllerTest::testCannotGetConfig";d:0;s:80:"OCA\Gallery\Controller\ConfigPublicControllerTest::testGetConfigWithBrokenSystem";d:0;s:70:"OCA\Gallery\Controller\FilesApiControllerTest::testDownloadWithWrongId";d:0.003;s:76:"OCA\Gallery\Controller\FilesApiControllerTest::testDownload with data set #0";d:0.001;s:76:"OCA\Gallery\Controller\FilesApiControllerTest::testDownload with data set #1";d:0;s:92:"OCA\Gallery\Controller\FilesApiControllerTest::testGetFilesWithWorkingSetup with data set #0";d:0;s:92:"OCA\Gallery\Controller\FilesApiControllerTest::testGetFilesWithWorkingSetup with data set #1";d:0;s:74:"OCA\Gallery\Controller\FilesApiControllerTest::testGetFilesWithBrokenSetup";d:0;s:82:"OCA\Gallery\Controller\FilesApiControllerTest::testGetReducedPath with data set #0";d:0;s:82:"OCA\Gallery\Controller\FilesApiControllerTest::testGetReducedPath with data set #1";d:0;s:82:"OCA\Gallery\Controller\FilesApiControllerTest::testGetReducedPath with data set #2";d:0;s:76:"OCA\Gallery\Controller\FilesApiControllerTest::testGetFilesWithFileDropShare";d:0.001;s:73:"OCA\Gallery\Controller\FilesControllerTest::testDownload with data set #0";d:0;s:73:"OCA\Gallery\Controller\FilesControllerTest::testDownload with data set #1";d:0;s:67:"OCA\Gallery\Controller\FilesControllerTest::testDownloadWithWrongId";d:0;s:89:"OCA\Gallery\Controller\FilesControllerTest::testGetFilesWithWorkingSetup with data set #0";d:0;s:89:"OCA\Gallery\Controller\FilesControllerTest::testGetFilesWithWorkingSetup with data set #1";d:0;s:71:"OCA\Gallery\Controller\FilesControllerTest::testGetFilesWithBrokenSetup";d:0;s:79:"OCA\Gallery\Controller\FilesControllerTest::testGetReducedPath with data set #0";d:0;s:79:"OCA\Gallery\Controller\FilesControllerTest::testGetReducedPath with data set #1";d:0;s:79:"OCA\Gallery\Controller\FilesControllerTest::testGetReducedPath with data set #2";d:0;s:73:"OCA\Gallery\Controller\FilesControllerTest::testGetFilesWithFileDropShare";d:0.001;s:79:"OCA\Gallery\Controller\FilesPublicControllerTest::testDownload with data set #0";d:0.001;s:79:"OCA\Gallery\Controller\FilesPublicControllerTest::testDownload with data set #1";d:0.001;s:73:"OCA\Gallery\Controller\FilesPublicControllerTest::testDownloadWithWrongId";d:0;s:95:"OCA\Gallery\Controller\FilesPublicControllerTest::testGetFilesWithWorkingSetup with data set #0";d:0;s:95:"OCA\Gallery\Controller\FilesPublicControllerTest::testGetFilesWithWorkingSetup with data set #1";d:0;s:77:"OCA\Gallery\Controller\FilesPublicControllerTest::testGetFilesWithBrokenSetup";d:0;s:85:"OCA\Gallery\Controller\FilesPublicControllerTest::testGetReducedPath with data set #0";d:0;s:85:"OCA\Gallery\Controller\FilesPublicControllerTest::testGetReducedPath with data set #1";d:0;s:85:"OCA\Gallery\Controller\FilesPublicControllerTest::testGetReducedPath with data set #2";d:0;s:79:"OCA\Gallery\Controller\FilesPublicControllerTest::testGetFilesWithFileDropShare";d:0.001;s:68:"OCA\Gallery\Controller\HttpErrorTest::testJsonError with data set #0";d:0.001;s:68:"OCA\Gallery\Controller\HttpErrorTest::testJsonError with data set #1";d:0;s:68:"OCA\Gallery\Controller\HttpErrorTest::testJsonError with data set #2";d:0;s:68:"OCA\Gallery\Controller\HttpErrorTest::testJsonError with data set #3";d:0;s:68:"OCA\Gallery\Controller\HttpErrorTest::testJsonError with data set #4";d:0;s:68:"OCA\Gallery\Controller\HttpErrorTest::testHtmlError with data set #0";d:0;s:68:"OCA\Gallery\Controller\HttpErrorTest::testHtmlError with data set #1";d:0;s:68:"OCA\Gallery\Controller\HttpErrorTest::testHtmlError with data set #2";d:0;s:68:"OCA\Gallery\Controller\HttpErrorTest::testHtmlError with data set #3";d:0;s:68:"OCA\Gallery\Controller\HttpErrorTest::testHtmlError with data set #4";d:0;s:52:"OCA\Gallery\Controller\PageControllerTest::testIndex";d:0.001;s:68:"OCA\Gallery\Controller\PageControllerTest::testCspForImgContainsData";d:0;s:70:"OCA\Gallery\Controller\PageControllerTest::testCspForFontsContainsData";d:0;s:56:"OCA\Gallery\Controller\PageControllerTest::testSlideshow";d:0.002;s:73:"OCA\Gallery\Controller\PageControllerTest::testPublicIndexWithFolderToken";d:0.001;s:71:"OCA\Gallery\Controller\PageControllerTest::testPublicIndexWithFileToken";d:0;s:56:"OCA\Gallery\Controller\PageControllerTest::testErrorPage";d:0;s:85:"OCA\Gallery\Controller\PreviewApiControllerTest::testGetPreviewOfSvg with data set #0";d:0.001;s:85:"OCA\Gallery\Controller\PreviewApiControllerTest::testGetPreviewOfSvg with data set #1";d:0.001;s:73:"OCA\Gallery\Controller\PreviewApiControllerTest::testGetThumbnailsWillDie";d:0.001;s:68:"OCA\Gallery\Controller\PreviewApiControllerTest::testEventSourceSend";d:0.001;s:65:"OCA\Gallery\Controller\PreviewApiControllerTest::testGetThumbnail";d:0.002;s:71:"OCA\Gallery\Controller\PreviewApiControllerTest::testGetBrokenThumbnail";d:0.002;s:80:"OCA\Gallery\Controller\PreviewApiControllerTest::testGetThumbnailWithBrokenSetup";d:0.002;s:63:"OCA\Gallery\Controller\PreviewApiControllerTest::testGetPreview";d:0.001;s:74:"OCA\Gallery\Controller\PreviewApiControllerTest::testGetPreviewWithWrongId";d:0;s:76:"OCA\Gallery\Controller\PreviewApiControllerTest::testGetPreviewWithBrokenGif";d:0.002;s:70:"OCA\Gallery\Controller\PreviewControllerTest::testGetThumbnailsWillDie";d:0.001;s:65:"OCA\Gallery\Controller\PreviewControllerTest::testEventSourceSend";d:0.001;s:62:"OCA\Gallery\Controller\PreviewControllerTest::testGetThumbnail";d:0.001;s:68:"OCA\Gallery\Controller\PreviewControllerTest::testGetBrokenThumbnail";d:0.002;s:77:"OCA\Gallery\Controller\PreviewControllerTest::testGetThumbnailWithBrokenSetup";d:0.002;s:60:"OCA\Gallery\Controller\PreviewControllerTest::testGetPreview";d:0.002;s:71:"OCA\Gallery\Controller\PreviewControllerTest::testGetPreviewWithWrongId";d:0.001;s:73:"OCA\Gallery\Controller\PreviewControllerTest::testGetPreviewWithBrokenGif";d:0.002;s:76:"OCA\Gallery\Controller\PreviewPublicControllerTest::testGetThumbnailsWillDie";d:0.002;s:71:"OCA\Gallery\Controller\PreviewPublicControllerTest::testEventSourceSend";d:0.001;s:68:"OCA\Gallery\Controller\PreviewPublicControllerTest::testGetThumbnail";d:0.002;s:74:"OCA\Gallery\Controller\PreviewPublicControllerTest::testGetBrokenThumbnail";d:0.002;s:83:"OCA\Gallery\Controller\PreviewPublicControllerTest::testGetThumbnailWithBrokenSetup";d:0.002;s:66:"OCA\Gallery\Controller\PreviewPublicControllerTest::testGetPreview";d:0.002;s:77:"OCA\Gallery\Controller\PreviewPublicControllerTest::testGetPreviewWithWrongId";d:0;s:79:"OCA\Gallery\Controller\PreviewPublicControllerTest::testGetPreviewWithBrokenGif";d:0.002;s:78:"OCA\Gallery\Environment\EnvironmentTest::testGetNodeFromUserFolderWithNullUser";d:0.002;s:59:"OCA\Gallery\Environment\EnvironmentTest::testGetDisplayName";d:0;s:65:"OCA\Gallery\Http\ImageResponseTest::testRenderWithOcImageInstance";d:0.049;s:56:"OCA\Gallery\Http\ImageResponseTest::testRenderWithString";d:0;s:82:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testBeforeControllerWithoutNotation";d:0.002;s:100:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testBeforeControllerWithPublicNotationAndInvalidToken";d:0.001;s:93:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testBeforeControllerWithPublicNotationAndToken";d:0.002;s:109:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testBeforeControllerWithPublicNotationAndTokenAndValidPassword";d:0.001;s:111:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testBeforeControllerWithPublicNotationAndTokenAndInvalidPassword";d:0.001;s:95:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testBeforeControllerWithPublicNotationAndNoToken";d:0;s:84:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testBeforeControllerWithGuestNotation";d:0;s:81:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckSessionAfterPasswordEntry";d:0.001;s:82:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckSessionBeforePasswordEntry";d:0.001;s:79:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckSessionWithWrongSession";d:0.001;s:87:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckPasswordAfterValidPasswordEntry";d:0.001;s:89:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckPasswordAfterInvalidPasswordEntry";d:0.001;s:86:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testAuthenticateAfterValidPasswordEntry";d:0.001;s:88:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testAuthenticateAfterInvalidPasswordEntry";d:0.001;s:80:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testAuthenticateWithWrongLinkType";d:0.001;s:92:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckAuthorisationAfterValidPasswordEntry";d:0.001;s:94:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckAuthorisationAfterInvalidPasswordEntry";d:0.001;s:83:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckAuthorisationWithNoPassword";d:0.001;s:79:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckItemTypeWithItemTypeSet";d:0.001;s:82:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckItemTypeWithItemTypeNotSet";d:0.001;s:82:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckShareIsValidWithValidShare";d:0.001;s:84:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckShareIsValidWithMissingOwner";d:0.001;s:85:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckShareIsValidWithMissingSource";d:0.001;s:106:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testAfterExceptionWithCheckExceptionAndHtmlAcceptAnd401Code";d:0;s:106:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testAfterExceptionWithCheckExceptionAndHtmlAcceptAnd404Code";d:0;s:96:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testAfterExceptionWithCheckExceptionAndJsonAccept";d:0;s:86:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testAfterExceptionWithNonCheckException";d:0;s:89:"OCA\Gallery\Middleware\SharingCheckMiddlewareTest::testIsSharingEnabledWithSharingEnabled";d:0;s:90:"OCA\Gallery\Middleware\SharingCheckMiddlewareTest::testIsSharingEnabledWithSharingDisabled";d:0;s:88:"OCA\Gallery\Middleware\SharingCheckMiddlewareTest::testBeforeControllerWithGuestNotation";d:0;s:90:"OCA\Gallery\Middleware\SharingCheckMiddlewareTest::testBeforeControllerWithAllRequirements";d:0;s:96:"OCA\Gallery\Middleware\SharingCheckMiddlewareTest::testBeforeControllerWithoutPublicPageNotation";d:0;s:90:"OCA\Gallery\Middleware\SharingCheckMiddlewareTest::testBeforeControllerWithSharingDisabled";d:0;s:71:"OCA\Gallery\Preview\PreviewTest::testGetPreviewFromCoreWithBrokenSystem";d:0.002;s:65:"OCA\Gallery\Service\Base64EncodeTest::testEncode with data set #0";d:0;s:65:"OCA\Gallery\Service\Base64EncodeTest::testEncode with data set #1";d:0;s:65:"OCA\Gallery\Service\Base64EncodeTest::testEncode with data set #2";d:0;s:65:"OCA\Gallery\Service\Base64EncodeTest::testEncode with data set #3";d:0;s:82:"OCA\Gallery\Service\ConfigServiceTest::testGetSupportedMediaTypes with data set #0";d:0;s:82:"OCA\Gallery\Service\ConfigServiceTest::testGetSupportedMediaTypes with data set #1";d:0;s:82:"OCA\Gallery\Service\ConfigServiceTest::testGetSupportedMediaTypes with data set #2";d:0;s:82:"OCA\Gallery\Service\ConfigServiceTest::testGetSupportedMediaTypes with data set #3";d:0;s:88:"OCA\Gallery\Service\ConfigServiceTest::testGetSupportedMediaTypesWithBrokenPreviewSystem";d:0;s:76:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeType with data set #0";d:0;s:76:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeType with data set #1";d:0;s:76:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeType with data set #2";d:0;s:76:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeType with data set #3";d:0;s:76:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeType with data set #4";d:0;s:93:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeTypeWithForbiddenMime with data set #0";d:0;s:93:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeTypeWithForbiddenMime with data set #1";d:0;s:93:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeTypeWithForbiddenMime with data set #2";d:0;s:93:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeTypeWithForbiddenMime with data set #3";d:0;s:93:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeTypeWithForbiddenMime with data set #4";d:0;s:93:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeTypeWithForbiddenMime with data set #5";d:0;s:73:"OCA\Gallery\Service\ConfigServiceTest::testAddSvgSupport with data set #0";d:0;s:73:"OCA\Gallery\Service\ConfigServiceTest::testAddSvgSupport with data set #1";d:0;s:73:"OCA\Gallery\Service\ConfigServiceTest::testAddSvgSupport with data set #2";d:0;s:73:"OCA\Gallery\Service\ConfigServiceTest::testAddSvgSupport with data set #3";d:0;s:75:"OCA\Gallery\Service\ConfigServiceTest::testBuildFolderConfigWithBrokenSetup";d:0.002;s:79:"OCA\Gallery\Service\ConfigServiceTest::testValidatesInfoConfig with data set #0";d:0;s:79:"OCA\Gallery\Service\ConfigServiceTest::testValidatesInfoConfig with data set #1";d:0;s:79:"OCA\Gallery\Service\ConfigServiceTest::testValidatesInfoConfig with data set #2";d:0;s:60:"OCA\Gallery\Service\DownloadServiceTest::testDownloadRawFile";d:0.001;s:70:"OCA\Gallery\Service\DownloadServiceTest::testDownloadBase64EncodedFile";d:0.001;s:68:"OCA\Gallery\Service\DownloadServiceTest::testDownloadNonExistentFile";d:0;s:85:"OCA\Gallery\Service\PreviewServiceTest::testIsPreviewRequiredWithSvg with data set #0";d:0.001;s:85:"OCA\Gallery\Service\PreviewServiceTest::testIsPreviewRequiredWithSvg with data set #1";d:0.001;s:93:"OCA\Gallery\Service\PreviewServiceTest::testIsPreviewRequiredWithAnimatedGif with data set #0";d:0.001;s:93:"OCA\Gallery\Service\PreviewServiceTest::testIsPreviewRequiredWithAnimatedGif with data set #1";d:0.001;s:93:"OCA\Gallery\Service\PreviewServiceTest::testIsPreviewRequiredWithAnimatedGif with data set #2";d:0.001;s:93:"OCA\Gallery\Service\PreviewServiceTest::testIsPreviewRequiredWithAnimatedGif with data set #3";d:0.001;s:77:"OCA\Gallery\Service\PreviewServiceTest::testIsPreviewRequiredWithBrokenSystem";d:0.001;s:74:"OCA\Gallery\Service\PreviewServiceTest::testIsPreviewRequiredWithBrokenGif";d:0.001;s:73:"OCA\Gallery\Service\PreviewServiceTest::testCreatePreviewWithBrokenSystem";d:0.001;s:76:"OCA\Gallery\Service\SearchFolderServiceTest::testGetNodeTypeWithBrokenFolder";d:0;s:76:"OCA\Gallery\Service\SearchFolderServiceTest::testGetAllowedSubFolderWithFile";d:0.001;s:73:"OCA\Gallery\Service\SearchFolderServiceTest::testSendFolderWithNullFolder";d:0;s:81:"OCA\Gallery\Service\SearchFolderServiceTest::testSendFolderWithNonAvailableFolder";d:0.002;s:59:"OCA\Gallery\Service\SearchFolderServiceTest::testSendFolder";d:0.002;s:84:"OCA\Gallery\Service\SearchFolderServiceTest::testSendExternalFolder with data set #0";d:0.003;s:84:"OCA\Gallery\Service\SearchFolderServiceTest::testSendExternalFolder with data set #1";d:0.004;s:91:"OCA\Gallery\Service\SearchFolderServiceTest::testGetNodesWithBrokenListing with data set #0";d:0;s:91:"OCA\Gallery\Service\SearchFolderServiceTest::testGetNodesWithBrokenListing with data set #1";d:0;s:90:"OCA\Gallery\Service\SearchFolderServiceTest::testRecoverFromGetNodesError with data set #0";d:0;s:90:"OCA\Gallery\Service\SearchFolderServiceTest::testRecoverFromGetNodesError with data set #1";d:0;s:84:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailableWithNullFolder";d:0;s:85:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailableWithBrokenSetup";d:0.002;s:104:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailableWithMountedFolder with data set #0";d:0.002;s:104:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailableWithMountedFolder with data set #1";d:0.002;s:104:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailableWithMountedFolder with data set #2";d:0.002;s:104:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailableWithMountedFolder with data set #3";d:0.002;s:87:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailable with data set #0";d:0.003;s:87:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailable with data set #1";d:0.003;s:87:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailable with data set #2";d:0.003;s:87:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailable with data set #3";d:0.003;s:82:"OCA\Gallery\Service\SearchFolderServiceTest::testValidateLocation with data set #0";d:0;s:82:"OCA\Gallery\Service\SearchFolderServiceTest::testValidateLocation with data set #1";d:0;s:75:"OCA\Gallery\Service\SearchFolderServiceTest::testFindFolderWithFileLocation";d:0.003;s:66:"OCA\Gallery\Service\SearchMediaServiceTest::testIsPreviewAvailable";d:0;s:78:"OCA\Gallery\Service\SearchMediaServiceTest::testGetMediaFiles with data set #0";d:0.003;s:78:"OCA\Gallery\Service\SearchMediaServiceTest::testGetMediaFiles with data set #1";d:0.004;s:78:"OCA\Gallery\Service\SearchMediaServiceTest::testGetMediaFiles with data set #2";d:0.003;s:78:"OCA\Gallery\Service\SearchMediaServiceTest::testGetMediaFiles with data set #3";d:0.001;s:78:"OCA\Gallery\Service\SearchMediaServiceTest::testGetMediaFiles with data set #4";d:0.002;s:78:"OCA\Gallery\Service\SearchMediaServiceTest::testGetMediaFiles with data set #5";d:0.003;s:90:"OCA\Gallery\Service\SearchMediaServiceTest::testPropertiesOfGetMediaFiles with data set #0";d:0.001;s:90:"OCA\Gallery\Service\SearchMediaServiceTest::testPropertiesOfGetMediaFiles with data set #1";d:0.001;s:55:"OCA\Gallery\Service\SearchMediaServiceTest::testGetFile";d:0.001;s:71:"OCA\Gallery\Service\SearchMediaServiceTest::testGetFileWithBadMediaType";d:0.001;s:67:"OCA\Gallery\Service\SearchMediaServiceTest::testGetFileWithFolderId";d:0.003;}}} \ No newline at end of file diff --git a/controller/filesapicontroller.php b/controller/filesapicontroller.php index 02680b4e13..eb3bdb1c6e 100644 --- a/controller/filesapicontroller.php +++ b/controller/filesapicontroller.php @@ -103,7 +103,7 @@ public function getList($location, $features, $etag, $mediatypes) { $share = $this->shareManager->getShareByToken($token); // Prevent user to see directory content if share is a file drop - if ($share->getPermissions() === \OCP\Constants::PERMISSION_CREATE) { + if (($share->getPermissions() & \OCP\Constants::PERMISSION_READ) !== \OCP\Constants::PERMISSION_READ) { return $this->formatResults([], [], [], "", ""); } } diff --git a/controller/filescontroller.php b/controller/filescontroller.php index 1fabea1b26..a32b7fe783 100644 --- a/controller/filescontroller.php +++ b/controller/filescontroller.php @@ -106,7 +106,7 @@ public function getList($location, $features, $etag, $mediatypes) { $share = $this->shareManager->getShareByToken($token); // Prevent user to see directory content if share is a file drop - if ($share->getPermissions() === \OCP\Constants::PERMISSION_CREATE) { + if (($share->getPermissions() & \OCP\Constants::PERMISSION_READ) !== \OCP\Constants::PERMISSION_READ) { return $this->formatResults([], [], [], "", ""); } } From 921919a26efec8d18d8ba6b5d88e01b87835cf85 Mon Sep 17 00:00:00 2001 From: Jannik Stehle Date: Mon, 10 May 2021 14:18:02 +0200 Subject: [PATCH 4/4] Remove unnecessary files --- .DS_Store | Bin 6148 -> 0 bytes .phpunit.result.cache | 1 - 2 files changed, 1 deletion(-) delete mode 100644 .DS_Store delete mode 100644 .phpunit.result.cache diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 15105b99f7158ce88daa9e5b1d2faf1a4ef310f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%}T>S5T2<;TI-=lk9!tH`UbH?@F?^JBu4z9ZHl0H%+&`Gd;w416ko_E@SB~X zO`4Y8L}dnMzs>AScJgJ(WQd4|_xXURPedK4V5^H^g~+;SLt18$MUM9<=x%&97+n;T zS;N~6zmWlXciZ$pmo%lEmfzpY+0pX)q)5|jTx76!_Pg)BxA1Y?^vO5+%&r&bgm>d{ z*{SA1hm_F`O>5`r^!XEet@Nwr_4IXc`>J`Z@m=J%$+wy(J^HZ*|1QpeGw}BrK+P8E z^b~z`2AlzBV9tPi9|BY`F)S71rvpQ50f23oqhKz*gv12H#IRJv3WPNjsG)2v25UI% z!Tb`#Qc=T+t@&WvnXN4AdFe(#yWo|C9Coe?7>roB?OxUopV# zbd(P9NLE`L4=1%YK+mBf;#VrpLokV@7`{@9_n=W=4>AEJhNU7b5dRT~H2B~Q{3rw8 D_JmUK diff --git a/.phpunit.result.cache b/.phpunit.result.cache deleted file mode 100644 index 69795cc726..0000000000 --- a/.phpunit.result.cache +++ /dev/null @@ -1 +0,0 @@ -C:37:"PHPUnit\Runner\DefaultTestResultCache":21779:{a:2:{s:7:"defects";a:0:{}s:5:"times";a:235:{s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFeaturesList with data set #0";d:0.008;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFeaturesList with data set #1";d:0.003;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFeaturesList with data set #2";d:0.003;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFeaturesList with data set #3";d:0.002;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFeaturesList with data set #4";d:0.003;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFeaturesList with data set #5";d:0.002;s:72:"OCA\Gallery\Config\ConfigParserTest::testGetFeaturesListWithBrokenConfig";d:0.002;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFolderConfig with data set #0";d:0.003;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFolderConfig with data set #1";d:0.003;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFolderConfig with data set #2";d:0.003;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFolderConfig with data set #3";d:0.003;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFolderConfig with data set #4";d:0.002;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFolderConfig with data set #5";d:0.002;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFolderConfig with data set #6";d:0.002;s:73:"OCA\Gallery\Config\ConfigParserTest::testGetFolderConfig with data set #7";d:0.002;s:73:"OCA\Gallery\Config\ConfigValidatorTest::testIsConfigSafe with data set #0";d:0;s:73:"OCA\Gallery\Config\ConfigValidatorTest::testIsConfigSafe with data set #1";d:0;s:73:"OCA\Gallery\Config\ConfigValidatorTest::testIsConfigSafe with data set #2";d:0;s:73:"OCA\Gallery\Config\ConfigValidatorTest::testIsConfigSafe with data set #3";d:0;s:73:"OCA\Gallery\Config\ConfigValidatorTest::testIsConfigSafe with data set #4";d:0;s:73:"OCA\Gallery\Config\ConfigValidatorTest::testIsConfigSafe with data set #5";d:0;s:73:"OCA\Gallery\Config\ConfigValidatorTest::testIsConfigSafe with data set #6";d:0;s:73:"OCA\Gallery\Config\ConfigValidatorTest::testIsConfigSafe with data set #7";d:0;s:73:"OCA\Gallery\Config\ConfigValidatorTest::testIsConfigSafe with data set #8";d:0;s:78:"OCA\Gallery\Controller\ConfigApiControllerTest::testGetConfig with data set #0";d:0.002;s:78:"OCA\Gallery\Controller\ConfigApiControllerTest::testGetConfig with data set #1";d:0;s:78:"OCA\Gallery\Controller\ConfigApiControllerTest::testGetConfig with data set #2";d:0;s:78:"OCA\Gallery\Controller\ConfigApiControllerTest::testGetConfig with data set #3";d:0;s:78:"OCA\Gallery\Controller\ConfigApiControllerTest::testGetConfig with data set #4";d:0;s:78:"OCA\Gallery\Controller\ConfigApiControllerTest::testGetConfig with data set #5";d:0;s:67:"OCA\Gallery\Controller\ConfigApiControllerTest::testCannotGetConfig";d:0;s:77:"OCA\Gallery\Controller\ConfigApiControllerTest::testGetConfigWithBrokenSystem";d:0.001;s:75:"OCA\Gallery\Controller\ConfigControllerTest::testGetConfig with data set #0";d:0;s:75:"OCA\Gallery\Controller\ConfigControllerTest::testGetConfig with data set #1";d:0;s:75:"OCA\Gallery\Controller\ConfigControllerTest::testGetConfig with data set #2";d:0;s:75:"OCA\Gallery\Controller\ConfigControllerTest::testGetConfig with data set #3";d:0;s:75:"OCA\Gallery\Controller\ConfigControllerTest::testGetConfig with data set #4";d:0;s:75:"OCA\Gallery\Controller\ConfigControllerTest::testGetConfig with data set #5";d:0;s:64:"OCA\Gallery\Controller\ConfigControllerTest::testCannotGetConfig";d:0;s:74:"OCA\Gallery\Controller\ConfigControllerTest::testGetConfigWithBrokenSystem";d:0;s:81:"OCA\Gallery\Controller\ConfigPublicControllerTest::testGetConfig with data set #0";d:0;s:81:"OCA\Gallery\Controller\ConfigPublicControllerTest::testGetConfig with data set #1";d:0;s:81:"OCA\Gallery\Controller\ConfigPublicControllerTest::testGetConfig with data set #2";d:0;s:81:"OCA\Gallery\Controller\ConfigPublicControllerTest::testGetConfig with data set #3";d:0;s:81:"OCA\Gallery\Controller\ConfigPublicControllerTest::testGetConfig with data set #4";d:0;s:81:"OCA\Gallery\Controller\ConfigPublicControllerTest::testGetConfig with data set #5";d:0;s:70:"OCA\Gallery\Controller\ConfigPublicControllerTest::testCannotGetConfig";d:0;s:80:"OCA\Gallery\Controller\ConfigPublicControllerTest::testGetConfigWithBrokenSystem";d:0;s:70:"OCA\Gallery\Controller\FilesApiControllerTest::testDownloadWithWrongId";d:0.003;s:76:"OCA\Gallery\Controller\FilesApiControllerTest::testDownload with data set #0";d:0.001;s:76:"OCA\Gallery\Controller\FilesApiControllerTest::testDownload with data set #1";d:0;s:92:"OCA\Gallery\Controller\FilesApiControllerTest::testGetFilesWithWorkingSetup with data set #0";d:0;s:92:"OCA\Gallery\Controller\FilesApiControllerTest::testGetFilesWithWorkingSetup with data set #1";d:0;s:74:"OCA\Gallery\Controller\FilesApiControllerTest::testGetFilesWithBrokenSetup";d:0;s:82:"OCA\Gallery\Controller\FilesApiControllerTest::testGetReducedPath with data set #0";d:0;s:82:"OCA\Gallery\Controller\FilesApiControllerTest::testGetReducedPath with data set #1";d:0;s:82:"OCA\Gallery\Controller\FilesApiControllerTest::testGetReducedPath with data set #2";d:0;s:76:"OCA\Gallery\Controller\FilesApiControllerTest::testGetFilesWithFileDropShare";d:0.001;s:73:"OCA\Gallery\Controller\FilesControllerTest::testDownload with data set #0";d:0;s:73:"OCA\Gallery\Controller\FilesControllerTest::testDownload with data set #1";d:0;s:67:"OCA\Gallery\Controller\FilesControllerTest::testDownloadWithWrongId";d:0;s:89:"OCA\Gallery\Controller\FilesControllerTest::testGetFilesWithWorkingSetup with data set #0";d:0;s:89:"OCA\Gallery\Controller\FilesControllerTest::testGetFilesWithWorkingSetup with data set #1";d:0;s:71:"OCA\Gallery\Controller\FilesControllerTest::testGetFilesWithBrokenSetup";d:0;s:79:"OCA\Gallery\Controller\FilesControllerTest::testGetReducedPath with data set #0";d:0;s:79:"OCA\Gallery\Controller\FilesControllerTest::testGetReducedPath with data set #1";d:0;s:79:"OCA\Gallery\Controller\FilesControllerTest::testGetReducedPath with data set #2";d:0;s:73:"OCA\Gallery\Controller\FilesControllerTest::testGetFilesWithFileDropShare";d:0.001;s:79:"OCA\Gallery\Controller\FilesPublicControllerTest::testDownload with data set #0";d:0.001;s:79:"OCA\Gallery\Controller\FilesPublicControllerTest::testDownload with data set #1";d:0.001;s:73:"OCA\Gallery\Controller\FilesPublicControllerTest::testDownloadWithWrongId";d:0;s:95:"OCA\Gallery\Controller\FilesPublicControllerTest::testGetFilesWithWorkingSetup with data set #0";d:0;s:95:"OCA\Gallery\Controller\FilesPublicControllerTest::testGetFilesWithWorkingSetup with data set #1";d:0;s:77:"OCA\Gallery\Controller\FilesPublicControllerTest::testGetFilesWithBrokenSetup";d:0;s:85:"OCA\Gallery\Controller\FilesPublicControllerTest::testGetReducedPath with data set #0";d:0;s:85:"OCA\Gallery\Controller\FilesPublicControllerTest::testGetReducedPath with data set #1";d:0;s:85:"OCA\Gallery\Controller\FilesPublicControllerTest::testGetReducedPath with data set #2";d:0;s:79:"OCA\Gallery\Controller\FilesPublicControllerTest::testGetFilesWithFileDropShare";d:0.001;s:68:"OCA\Gallery\Controller\HttpErrorTest::testJsonError with data set #0";d:0.001;s:68:"OCA\Gallery\Controller\HttpErrorTest::testJsonError with data set #1";d:0;s:68:"OCA\Gallery\Controller\HttpErrorTest::testJsonError with data set #2";d:0;s:68:"OCA\Gallery\Controller\HttpErrorTest::testJsonError with data set #3";d:0;s:68:"OCA\Gallery\Controller\HttpErrorTest::testJsonError with data set #4";d:0;s:68:"OCA\Gallery\Controller\HttpErrorTest::testHtmlError with data set #0";d:0;s:68:"OCA\Gallery\Controller\HttpErrorTest::testHtmlError with data set #1";d:0;s:68:"OCA\Gallery\Controller\HttpErrorTest::testHtmlError with data set #2";d:0;s:68:"OCA\Gallery\Controller\HttpErrorTest::testHtmlError with data set #3";d:0;s:68:"OCA\Gallery\Controller\HttpErrorTest::testHtmlError with data set #4";d:0;s:52:"OCA\Gallery\Controller\PageControllerTest::testIndex";d:0.001;s:68:"OCA\Gallery\Controller\PageControllerTest::testCspForImgContainsData";d:0;s:70:"OCA\Gallery\Controller\PageControllerTest::testCspForFontsContainsData";d:0;s:56:"OCA\Gallery\Controller\PageControllerTest::testSlideshow";d:0.002;s:73:"OCA\Gallery\Controller\PageControllerTest::testPublicIndexWithFolderToken";d:0.001;s:71:"OCA\Gallery\Controller\PageControllerTest::testPublicIndexWithFileToken";d:0;s:56:"OCA\Gallery\Controller\PageControllerTest::testErrorPage";d:0;s:85:"OCA\Gallery\Controller\PreviewApiControllerTest::testGetPreviewOfSvg with data set #0";d:0.001;s:85:"OCA\Gallery\Controller\PreviewApiControllerTest::testGetPreviewOfSvg with data set #1";d:0.001;s:73:"OCA\Gallery\Controller\PreviewApiControllerTest::testGetThumbnailsWillDie";d:0.001;s:68:"OCA\Gallery\Controller\PreviewApiControllerTest::testEventSourceSend";d:0.001;s:65:"OCA\Gallery\Controller\PreviewApiControllerTest::testGetThumbnail";d:0.002;s:71:"OCA\Gallery\Controller\PreviewApiControllerTest::testGetBrokenThumbnail";d:0.002;s:80:"OCA\Gallery\Controller\PreviewApiControllerTest::testGetThumbnailWithBrokenSetup";d:0.002;s:63:"OCA\Gallery\Controller\PreviewApiControllerTest::testGetPreview";d:0.001;s:74:"OCA\Gallery\Controller\PreviewApiControllerTest::testGetPreviewWithWrongId";d:0;s:76:"OCA\Gallery\Controller\PreviewApiControllerTest::testGetPreviewWithBrokenGif";d:0.002;s:70:"OCA\Gallery\Controller\PreviewControllerTest::testGetThumbnailsWillDie";d:0.001;s:65:"OCA\Gallery\Controller\PreviewControllerTest::testEventSourceSend";d:0.001;s:62:"OCA\Gallery\Controller\PreviewControllerTest::testGetThumbnail";d:0.001;s:68:"OCA\Gallery\Controller\PreviewControllerTest::testGetBrokenThumbnail";d:0.002;s:77:"OCA\Gallery\Controller\PreviewControllerTest::testGetThumbnailWithBrokenSetup";d:0.002;s:60:"OCA\Gallery\Controller\PreviewControllerTest::testGetPreview";d:0.002;s:71:"OCA\Gallery\Controller\PreviewControllerTest::testGetPreviewWithWrongId";d:0.001;s:73:"OCA\Gallery\Controller\PreviewControllerTest::testGetPreviewWithBrokenGif";d:0.002;s:76:"OCA\Gallery\Controller\PreviewPublicControllerTest::testGetThumbnailsWillDie";d:0.002;s:71:"OCA\Gallery\Controller\PreviewPublicControllerTest::testEventSourceSend";d:0.001;s:68:"OCA\Gallery\Controller\PreviewPublicControllerTest::testGetThumbnail";d:0.002;s:74:"OCA\Gallery\Controller\PreviewPublicControllerTest::testGetBrokenThumbnail";d:0.002;s:83:"OCA\Gallery\Controller\PreviewPublicControllerTest::testGetThumbnailWithBrokenSetup";d:0.002;s:66:"OCA\Gallery\Controller\PreviewPublicControllerTest::testGetPreview";d:0.002;s:77:"OCA\Gallery\Controller\PreviewPublicControllerTest::testGetPreviewWithWrongId";d:0;s:79:"OCA\Gallery\Controller\PreviewPublicControllerTest::testGetPreviewWithBrokenGif";d:0.002;s:78:"OCA\Gallery\Environment\EnvironmentTest::testGetNodeFromUserFolderWithNullUser";d:0.002;s:59:"OCA\Gallery\Environment\EnvironmentTest::testGetDisplayName";d:0;s:65:"OCA\Gallery\Http\ImageResponseTest::testRenderWithOcImageInstance";d:0.049;s:56:"OCA\Gallery\Http\ImageResponseTest::testRenderWithString";d:0;s:82:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testBeforeControllerWithoutNotation";d:0.002;s:100:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testBeforeControllerWithPublicNotationAndInvalidToken";d:0.001;s:93:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testBeforeControllerWithPublicNotationAndToken";d:0.002;s:109:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testBeforeControllerWithPublicNotationAndTokenAndValidPassword";d:0.001;s:111:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testBeforeControllerWithPublicNotationAndTokenAndInvalidPassword";d:0.001;s:95:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testBeforeControllerWithPublicNotationAndNoToken";d:0;s:84:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testBeforeControllerWithGuestNotation";d:0;s:81:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckSessionAfterPasswordEntry";d:0.001;s:82:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckSessionBeforePasswordEntry";d:0.001;s:79:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckSessionWithWrongSession";d:0.001;s:87:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckPasswordAfterValidPasswordEntry";d:0.001;s:89:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckPasswordAfterInvalidPasswordEntry";d:0.001;s:86:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testAuthenticateAfterValidPasswordEntry";d:0.001;s:88:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testAuthenticateAfterInvalidPasswordEntry";d:0.001;s:80:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testAuthenticateWithWrongLinkType";d:0.001;s:92:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckAuthorisationAfterValidPasswordEntry";d:0.001;s:94:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckAuthorisationAfterInvalidPasswordEntry";d:0.001;s:83:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckAuthorisationWithNoPassword";d:0.001;s:79:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckItemTypeWithItemTypeSet";d:0.001;s:82:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckItemTypeWithItemTypeNotSet";d:0.001;s:82:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckShareIsValidWithValidShare";d:0.001;s:84:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckShareIsValidWithMissingOwner";d:0.001;s:85:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testCheckShareIsValidWithMissingSource";d:0.001;s:106:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testAfterExceptionWithCheckExceptionAndHtmlAcceptAnd401Code";d:0;s:106:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testAfterExceptionWithCheckExceptionAndHtmlAcceptAnd404Code";d:0;s:96:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testAfterExceptionWithCheckExceptionAndJsonAccept";d:0;s:86:"OCA\Gallery\Middleware\EnvCheckMiddlewareTest::testAfterExceptionWithNonCheckException";d:0;s:89:"OCA\Gallery\Middleware\SharingCheckMiddlewareTest::testIsSharingEnabledWithSharingEnabled";d:0;s:90:"OCA\Gallery\Middleware\SharingCheckMiddlewareTest::testIsSharingEnabledWithSharingDisabled";d:0;s:88:"OCA\Gallery\Middleware\SharingCheckMiddlewareTest::testBeforeControllerWithGuestNotation";d:0;s:90:"OCA\Gallery\Middleware\SharingCheckMiddlewareTest::testBeforeControllerWithAllRequirements";d:0;s:96:"OCA\Gallery\Middleware\SharingCheckMiddlewareTest::testBeforeControllerWithoutPublicPageNotation";d:0;s:90:"OCA\Gallery\Middleware\SharingCheckMiddlewareTest::testBeforeControllerWithSharingDisabled";d:0;s:71:"OCA\Gallery\Preview\PreviewTest::testGetPreviewFromCoreWithBrokenSystem";d:0.002;s:65:"OCA\Gallery\Service\Base64EncodeTest::testEncode with data set #0";d:0;s:65:"OCA\Gallery\Service\Base64EncodeTest::testEncode with data set #1";d:0;s:65:"OCA\Gallery\Service\Base64EncodeTest::testEncode with data set #2";d:0;s:65:"OCA\Gallery\Service\Base64EncodeTest::testEncode with data set #3";d:0;s:82:"OCA\Gallery\Service\ConfigServiceTest::testGetSupportedMediaTypes with data set #0";d:0;s:82:"OCA\Gallery\Service\ConfigServiceTest::testGetSupportedMediaTypes with data set #1";d:0;s:82:"OCA\Gallery\Service\ConfigServiceTest::testGetSupportedMediaTypes with data set #2";d:0;s:82:"OCA\Gallery\Service\ConfigServiceTest::testGetSupportedMediaTypes with data set #3";d:0;s:88:"OCA\Gallery\Service\ConfigServiceTest::testGetSupportedMediaTypesWithBrokenPreviewSystem";d:0;s:76:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeType with data set #0";d:0;s:76:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeType with data set #1";d:0;s:76:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeType with data set #2";d:0;s:76:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeType with data set #3";d:0;s:76:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeType with data set #4";d:0;s:93:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeTypeWithForbiddenMime with data set #0";d:0;s:93:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeTypeWithForbiddenMime with data set #1";d:0;s:93:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeTypeWithForbiddenMime with data set #2";d:0;s:93:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeTypeWithForbiddenMime with data set #3";d:0;s:93:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeTypeWithForbiddenMime with data set #4";d:0;s:93:"OCA\Gallery\Service\ConfigServiceTest::testValidateMimeTypeWithForbiddenMime with data set #5";d:0;s:73:"OCA\Gallery\Service\ConfigServiceTest::testAddSvgSupport with data set #0";d:0;s:73:"OCA\Gallery\Service\ConfigServiceTest::testAddSvgSupport with data set #1";d:0;s:73:"OCA\Gallery\Service\ConfigServiceTest::testAddSvgSupport with data set #2";d:0;s:73:"OCA\Gallery\Service\ConfigServiceTest::testAddSvgSupport with data set #3";d:0;s:75:"OCA\Gallery\Service\ConfigServiceTest::testBuildFolderConfigWithBrokenSetup";d:0.002;s:79:"OCA\Gallery\Service\ConfigServiceTest::testValidatesInfoConfig with data set #0";d:0;s:79:"OCA\Gallery\Service\ConfigServiceTest::testValidatesInfoConfig with data set #1";d:0;s:79:"OCA\Gallery\Service\ConfigServiceTest::testValidatesInfoConfig with data set #2";d:0;s:60:"OCA\Gallery\Service\DownloadServiceTest::testDownloadRawFile";d:0.001;s:70:"OCA\Gallery\Service\DownloadServiceTest::testDownloadBase64EncodedFile";d:0.001;s:68:"OCA\Gallery\Service\DownloadServiceTest::testDownloadNonExistentFile";d:0;s:85:"OCA\Gallery\Service\PreviewServiceTest::testIsPreviewRequiredWithSvg with data set #0";d:0.001;s:85:"OCA\Gallery\Service\PreviewServiceTest::testIsPreviewRequiredWithSvg with data set #1";d:0.001;s:93:"OCA\Gallery\Service\PreviewServiceTest::testIsPreviewRequiredWithAnimatedGif with data set #0";d:0.001;s:93:"OCA\Gallery\Service\PreviewServiceTest::testIsPreviewRequiredWithAnimatedGif with data set #1";d:0.001;s:93:"OCA\Gallery\Service\PreviewServiceTest::testIsPreviewRequiredWithAnimatedGif with data set #2";d:0.001;s:93:"OCA\Gallery\Service\PreviewServiceTest::testIsPreviewRequiredWithAnimatedGif with data set #3";d:0.001;s:77:"OCA\Gallery\Service\PreviewServiceTest::testIsPreviewRequiredWithBrokenSystem";d:0.001;s:74:"OCA\Gallery\Service\PreviewServiceTest::testIsPreviewRequiredWithBrokenGif";d:0.001;s:73:"OCA\Gallery\Service\PreviewServiceTest::testCreatePreviewWithBrokenSystem";d:0.001;s:76:"OCA\Gallery\Service\SearchFolderServiceTest::testGetNodeTypeWithBrokenFolder";d:0;s:76:"OCA\Gallery\Service\SearchFolderServiceTest::testGetAllowedSubFolderWithFile";d:0.001;s:73:"OCA\Gallery\Service\SearchFolderServiceTest::testSendFolderWithNullFolder";d:0;s:81:"OCA\Gallery\Service\SearchFolderServiceTest::testSendFolderWithNonAvailableFolder";d:0.002;s:59:"OCA\Gallery\Service\SearchFolderServiceTest::testSendFolder";d:0.002;s:84:"OCA\Gallery\Service\SearchFolderServiceTest::testSendExternalFolder with data set #0";d:0.003;s:84:"OCA\Gallery\Service\SearchFolderServiceTest::testSendExternalFolder with data set #1";d:0.004;s:91:"OCA\Gallery\Service\SearchFolderServiceTest::testGetNodesWithBrokenListing with data set #0";d:0;s:91:"OCA\Gallery\Service\SearchFolderServiceTest::testGetNodesWithBrokenListing with data set #1";d:0;s:90:"OCA\Gallery\Service\SearchFolderServiceTest::testRecoverFromGetNodesError with data set #0";d:0;s:90:"OCA\Gallery\Service\SearchFolderServiceTest::testRecoverFromGetNodesError with data set #1";d:0;s:84:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailableWithNullFolder";d:0;s:85:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailableWithBrokenSetup";d:0.002;s:104:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailableWithMountedFolder with data set #0";d:0.002;s:104:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailableWithMountedFolder with data set #1";d:0.002;s:104:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailableWithMountedFolder with data set #2";d:0.002;s:104:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailableWithMountedFolder with data set #3";d:0.002;s:87:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailable with data set #0";d:0.003;s:87:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailable with data set #1";d:0.003;s:87:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailable with data set #2";d:0.003;s:87:"OCA\Gallery\Service\SearchFolderServiceTest::testIsAllowedAndAvailable with data set #3";d:0.003;s:82:"OCA\Gallery\Service\SearchFolderServiceTest::testValidateLocation with data set #0";d:0;s:82:"OCA\Gallery\Service\SearchFolderServiceTest::testValidateLocation with data set #1";d:0;s:75:"OCA\Gallery\Service\SearchFolderServiceTest::testFindFolderWithFileLocation";d:0.003;s:66:"OCA\Gallery\Service\SearchMediaServiceTest::testIsPreviewAvailable";d:0;s:78:"OCA\Gallery\Service\SearchMediaServiceTest::testGetMediaFiles with data set #0";d:0.003;s:78:"OCA\Gallery\Service\SearchMediaServiceTest::testGetMediaFiles with data set #1";d:0.004;s:78:"OCA\Gallery\Service\SearchMediaServiceTest::testGetMediaFiles with data set #2";d:0.003;s:78:"OCA\Gallery\Service\SearchMediaServiceTest::testGetMediaFiles with data set #3";d:0.001;s:78:"OCA\Gallery\Service\SearchMediaServiceTest::testGetMediaFiles with data set #4";d:0.002;s:78:"OCA\Gallery\Service\SearchMediaServiceTest::testGetMediaFiles with data set #5";d:0.003;s:90:"OCA\Gallery\Service\SearchMediaServiceTest::testPropertiesOfGetMediaFiles with data set #0";d:0.001;s:90:"OCA\Gallery\Service\SearchMediaServiceTest::testPropertiesOfGetMediaFiles with data set #1";d:0.001;s:55:"OCA\Gallery\Service\SearchMediaServiceTest::testGetFile";d:0.001;s:71:"OCA\Gallery\Service\SearchMediaServiceTest::testGetFileWithBadMediaType";d:0.001;s:67:"OCA\Gallery\Service\SearchMediaServiceTest::testGetFileWithFolderId";d:0.003;}}} \ No newline at end of file