diff options
Diffstat (limited to 'build')
-rw-r--r-- | build/integration/features/bootstrap/FilesDropContext.php | 6 | ||||
-rw-r--r-- | build/integration/features/bootstrap/Sharing.php | 4 | ||||
-rw-r--r-- | build/integration/features/bootstrap/WebDav.php | 6 | ||||
-rw-r--r-- | build/integration/features/maintenance-mode.feature | 6 | ||||
-rw-r--r-- | build/psalm-baseline.xml | 10 |
5 files changed, 22 insertions, 10 deletions
diff --git a/build/integration/features/bootstrap/FilesDropContext.php b/build/integration/features/bootstrap/FilesDropContext.php index a5d4dad14e3..22eaa639030 100644 --- a/build/integration/features/bootstrap/FilesDropContext.php +++ b/build/integration/features/bootstrap/FilesDropContext.php @@ -45,9 +45,8 @@ class FilesDropContext implements Context, SnippetAcceptingContext { } $base = substr($this->baseUrl, 0, -4); - $fullUrl = $base . '/public.php/webdav' . $path; + $fullUrl = $base . "/public.php/dav/files/$token/$path"; - $options['auth'] = [$token, '']; $options['headers'] = [ 'X-REQUESTED-WITH' => 'XMLHttpRequest' ]; @@ -73,9 +72,8 @@ class FilesDropContext implements Context, SnippetAcceptingContext { } $base = substr($this->baseUrl, 0, -4); - $fullUrl = $base . '/public.php/webdav/' . $folder; + $fullUrl = $base . "/public.php/dav/files/$token/$folder"; - $options['auth'] = [$token, '']; $options['headers'] = [ 'X-REQUESTED-WITH' => 'XMLHttpRequest' ]; diff --git a/build/integration/features/bootstrap/Sharing.php b/build/integration/features/bootstrap/Sharing.php index a38ef392e61..7993d502707 100644 --- a/build/integration/features/bootstrap/Sharing.php +++ b/build/integration/features/bootstrap/Sharing.php @@ -187,8 +187,8 @@ trait Sharing { $token = $this->lastShareData->data->token; } - $fullUrl = substr($this->baseUrl, 0, -4) . "public.php/webdav"; - $this->checkDownload($fullUrl, [$token, $password], 'text/plain'); + $fullUrl = substr($this->baseUrl, 0, -4) . "public.php/dav/files/$token/"; + $this->checkDownload($fullUrl, ['', $password], 'text/plain'); } private function checkDownload($url, $auth = null, $mimeType = null) { diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php index c239461b788..b919976e790 100644 --- a/build/integration/features/bootstrap/WebDav.php +++ b/build/integration/features/bootstrap/WebDav.php @@ -169,11 +169,10 @@ trait WebDav { */ public function downloadPublicFileWithRange($range) { $token = $this->lastShareData->data->token; - $fullUrl = substr($this->baseUrl, 0, -4) . "public.php/webdav"; + $fullUrl = substr($this->baseUrl, 0, -4) . "public.php/dav/files/$token"; $client = new GClient(); $options = []; - $options['auth'] = [$token, ""]; $options['headers'] = [ 'Range' => $range ]; @@ -187,7 +186,7 @@ trait WebDav { */ public function downloadPublicFileInsideAFolderWithRange($path, $range) { $token = $this->lastShareData->data->token; - $fullUrl = substr($this->baseUrl, 0, -4) . "public.php/webdav" . "$path"; + $fullUrl = substr($this->baseUrl, 0, -4) . "public.php/dav/files/$token/$path"; $client = new GClient(); $options = [ @@ -195,7 +194,6 @@ trait WebDav { 'Range' => $range ] ]; - $options['auth'] = [$token, ""]; $this->response = $client->request("GET", $fullUrl, $options); } diff --git a/build/integration/features/maintenance-mode.feature b/build/integration/features/maintenance-mode.feature index 56d3b9c0fb6..e6637a5edff 100644 --- a/build/integration/features/maintenance-mode.feature +++ b/build/integration/features/maintenance-mode.feature @@ -39,3 +39,9 @@ Feature: maintenance-mode Then the HTTP status code should be "503" Then Maintenance mode is disabled And the command was successful + + Scenario: Accessing /public.php/dav with maintenance mode enabled + When requesting "/public.php/dav" with "GET" + Then the HTTP status code should be "503" + Then Maintenance mode is disabled + And the command was successful diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index ba529091482..0ba7f3163dd 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -105,6 +105,16 @@ <code>$baseuri</code> </UndefinedGlobalVariable> </file> + <file src="apps/dav/appinfo/v2/publicremote.php"> + <InternalMethod> + <code>\OC\Files\Filesystem::logWarningWhenAddingStorageWrapper($previousLog)</code> + <code>\OC\Files\Filesystem::logWarningWhenAddingStorageWrapper(false)</code> + </InternalMethod> + <UndefinedGlobalVariable> + <code>$baseuri</code> + <code>$baseuri</code> + </UndefinedGlobalVariable> + </file> <file src="apps/dav/lib/AppInfo/Application.php"> <InvalidArgument> <code>CalendarDeletionDefaultUpdaterListener::class</code> |