From a313666cd0a408528fe0616a713fcc66d93ee430 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Mon, 19 Jul 2021 16:33:15 +0200 Subject: [PATCH] check name for illegal values during uploads and moves --- changelog/unreleased/tus-illegal-names.md | 5 ++ internal/http/services/owncloud/ocdav/move.go | 8 ++ .../http/services/owncloud/ocdav/ocdav.go | 23 ++++++ internal/http/services/owncloud/ocdav/tus.go | 8 +- .../expected-failures-on-OCIS-storage.md | 17 ----- .../expected-failures-on-OWNCLOUD-storage.md | 17 ----- .../expected-failures-on-S3NG-storage.md | 17 ----- .../apiWebdavMove1-moveFolder.feature | 75 ------------------- .../apiWebdavMove2-moveFile.feature | 12 --- 9 files changed, 41 insertions(+), 141 deletions(-) create mode 100644 changelog/unreleased/tus-illegal-names.md delete mode 100644 tests/acceptance/features/apiOcisSpecific/apiWebdavMove1-moveFolder.feature diff --git a/changelog/unreleased/tus-illegal-names.md b/changelog/unreleased/tus-illegal-names.md new file mode 100644 index 00000000000..95b501e5fff --- /dev/null +++ b/changelog/unreleased/tus-illegal-names.md @@ -0,0 +1,5 @@ +Enhancement: Check for illegal names while uploading or moving files + +The code was not checking for invalid file names during uploads and moves. + +https://github.com/cs3org/reva/pull/1900 diff --git a/internal/http/services/owncloud/ocdav/move.go b/internal/http/services/owncloud/ocdav/move.go index 49131375744..e93b5c41445 100644 --- a/internal/http/services/owncloud/ocdav/move.go +++ b/internal/http/services/owncloud/ocdav/move.go @@ -44,6 +44,14 @@ func (s *svc) handlePathMove(w http.ResponseWriter, r *http.Request, ns string) w.WriteHeader(http.StatusBadRequest) return } + + for _, r := range nameRules { + if !r.Test(dstPath) { + w.WriteHeader(http.StatusBadRequest) + return + } + } + dstPath = path.Join(ns, dstPath) sublog := appctx.GetLogger(ctx).With().Str("src", srcPath).Str("dst", dstPath).Logger() diff --git a/internal/http/services/owncloud/ocdav/ocdav.go b/internal/http/services/owncloud/ocdav/ocdav.go index 93134dd96dc..d13cb6000a6 100644 --- a/internal/http/services/owncloud/ocdav/ocdav.go +++ b/internal/http/services/owncloud/ocdav/ocdav.go @@ -54,8 +54,31 @@ const ( var ( errInvalidValue = errors.New("invalid value") + + nameRules = [...]nameRule{ + nameNotEmpty{}, + nameDoesNotContain{chars: "\f\r\n\\"}, + } ) +type nameRule interface { + Test(name string) bool +} + +type nameNotEmpty struct{} + +func (r nameNotEmpty) Test(name string) bool { + return len(strings.TrimSpace(name)) > 0 +} + +type nameDoesNotContain struct { + chars string +} + +func (r nameDoesNotContain) Test(name string) bool { + return !strings.ContainsAny(name, r.chars) +} + func init() { global.Register("ocdav", New) } diff --git a/internal/http/services/owncloud/ocdav/tus.go b/internal/http/services/owncloud/ocdav/tus.go index 91c07e7becd..0c7f7ccbb28 100644 --- a/internal/http/services/owncloud/ocdav/tus.go +++ b/internal/http/services/owncloud/ocdav/tus.go @@ -44,9 +44,11 @@ func (s *svc) handlePathTusPost(w http.ResponseWriter, r *http.Request, ns strin // read filename from metadata meta := tusd.ParseMetadataHeader(r.Header.Get(HeaderUploadMetadata)) - if meta["filename"] == "" { - w.WriteHeader(http.StatusPreconditionFailed) - return + for _, r := range nameRules { + if !r.Test(meta["filename"]) { + w.WriteHeader(http.StatusPreconditionFailed) + return + } } // append filename to current dir diff --git a/tests/acceptance/expected-failures-on-OCIS-storage.md b/tests/acceptance/expected-failures-on-OCIS-storage.md index d83949df4b9..44a357487ff 100644 --- a/tests/acceptance/expected-failures-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-on-OCIS-storage.md @@ -58,27 +58,13 @@ Basic file management like up and download, move, copy, properties, quota, trash - [apiWebdavUpload2/uploadFileUsingOldChunking.feature:43](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUpload2/uploadFileUsingOldChunking.feature#L43) #### [invalid file-names should not be created using the TUS protocol](https://github.com/owncloud/ocis/issues/1001) -- [apiWebdavUploadTUS/uploadFile.feature:143](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L143) -- [apiWebdavUploadTUS/uploadFile.feature:144](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L144) - [apiWebdavUploadTUS/uploadFile.feature:145](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L145) -- [apiWebdavUploadTUS/uploadFile.feature:146](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L146) -- [apiWebdavUploadTUS/uploadFile.feature:147](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L147) -- [apiWebdavUploadTUS/uploadFile.feature:148](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L148) - [apiWebdavUploadTUS/uploadFile.feature:149](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L149) -- [apiWebdavUploadTUS/uploadFile.feature:150](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L150) #### [upload a file using TUS resource URL as an other user should not work](https://github.com/owncloud/ocis/issues/1141) - [apiWebdavUploadTUS/uploadFile.feature:165](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L165) - [apiWebdavUploadTUS/uploadFile.feature:166](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L166) -#### [renaming to banned name works](https://github.com/owncloud/ocis/issues/1295) -- [apiWebdavMove1/moveFolder.feature:21](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L21) -- [apiWebdavMove1/moveFolder.feature:22](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L22) -- [apiWebdavMove1/moveFolder.feature:34](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L34) -- [apiWebdavMove1/moveFolder.feature:35](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L35) -- [apiWebdavMove1/moveFolder.feature:47](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L47) -- [apiWebdavMove1/moveFolder.feature:48](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L48) - #### [Getting information about a folder overwritten by a file gives 500 error instead of 404](https://github.com/owncloud/ocis/issues/1239) - [apiWebdavProperties1/copyFile.feature:134](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavProperties1/copyFile.feature#L134) - [apiWebdavProperties1/copyFile.feature:135](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavProperties1/copyFile.feature#L135) @@ -942,9 +928,6 @@ Scenario Outline: Moving a file to a shared folder with no permissions Scenario Outline: Moving a file to overwrite a file in a shared folder with no permissions - [apiWebdavMove2/moveFile.feature:213](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L213) - [apiWebdavMove2/moveFile.feature:214](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L214) -Scenario Outline: rename a file into an invalid filename -- [apiWebdavMove2/moveFile.feature:234](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L234) -- [apiWebdavMove2/moveFile.feature:235](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L235) Scenario Outline: Checking file id after a move between received shares - [apiWebdavMove2/moveFile.feature:272](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L272) - [apiWebdavMove2/moveFile.feature:273](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L273) diff --git a/tests/acceptance/expected-failures-on-OWNCLOUD-storage.md b/tests/acceptance/expected-failures-on-OWNCLOUD-storage.md index 58db83e2df8..ba546c21ac4 100644 --- a/tests/acceptance/expected-failures-on-OWNCLOUD-storage.md +++ b/tests/acceptance/expected-failures-on-OWNCLOUD-storage.md @@ -89,14 +89,8 @@ The following scenarios fail on OWNCLOUD storage but not on OCIS storage: - [apiWebdavUpload1/uploadFile.feature:113](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUpload1/uploadFile.feature#L113) #### [invalid file-names should not be created using the TUS protocol](https://github.com/owncloud/ocis/issues/1001) -- [apiWebdavUploadTUS/uploadFile.feature:143](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L135) -- [apiWebdavUploadTUS/uploadFile.feature:144](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L136) - [apiWebdavUploadTUS/uploadFile.feature:145](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L137) -- [apiWebdavUploadTUS/uploadFile.feature:146](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L138) -- [apiWebdavUploadTUS/uploadFile.feature:147](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L139) -- [apiWebdavUploadTUS/uploadFile.feature:148](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L140) - [apiWebdavUploadTUS/uploadFile.feature:149](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L141) -- [apiWebdavUploadTUS/uploadFile.feature:150](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L142) ### [500 Internal Server Error on Post request for TUS upload](https://github.com/owncloud/ocis/issues/1047) @@ -113,14 +107,6 @@ The following scenarios fail on OWNCLOUD storage but not on OCIS storage: - [apiWebdavUploadTUS/uploadFile.feature:165](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L155) - [apiWebdavUploadTUS/uploadFile.feature:166](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L156) -#### [renaming to banned name works](https://github.com/owncloud/ocis/issues/1295) -- [apiWebdavMove1/moveFolder.feature:21](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L21) -- [apiWebdavMove1/moveFolder.feature:22](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L22) -- [apiWebdavMove1/moveFolder.feature:34](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L34) -- [apiWebdavMove1/moveFolder.feature:35](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L35) -- [apiWebdavMove1/moveFolder.feature:47](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L47) -- [apiWebdavMove1/moveFolder.feature:48](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L48) - #### [Getting information about a folder overwritten by a file gives 500 error instead of 404](https://github.com/owncloud/ocis/issues/1239) - [apiWebdavProperties1/copyFile.feature:134](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavProperties1/copyFile.feature#L134) - [apiWebdavProperties1/copyFile.feature:135](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavProperties1/copyFile.feature#L135) @@ -1087,9 +1073,6 @@ Scenario Outline: Moving a file into a shared folder as the sharee and as the sh Scenario Outline: Moving a file to overwrite a file in a shared folder with no permissions - [apiWebdavMove2/moveFile.feature:213](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L213) - [apiWebdavMove2/moveFile.feature:214](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L214) - Scenario Outline: rename a file into an invalid filename -- [apiWebdavMove2/moveFile.feature:234](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L234) -- [apiWebdavMove2/moveFile.feature:235](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L235) Scenario Outline: Checking file id after a move between received shares - [apiWebdavMove2/moveFile.feature:272](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L272) - [apiWebdavMove2/moveFile.feature:273](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L273) diff --git a/tests/acceptance/expected-failures-on-S3NG-storage.md b/tests/acceptance/expected-failures-on-S3NG-storage.md index b04dea5dead..bb52fcb82cf 100644 --- a/tests/acceptance/expected-failures-on-S3NG-storage.md +++ b/tests/acceptance/expected-failures-on-S3NG-storage.md @@ -63,27 +63,13 @@ Basic file management like up and download, move, copy, properties, quota, trash - [apiWebdavUpload2/uploadFileUsingOldChunking.feature:43](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUpload2/uploadFileUsingOldChunking.feature#L43) #### [invalid file-names should not be created using the TUS protocol](https://github.com/owncloud/ocis/issues/1001) -- [apiWebdavUploadTUS/uploadFile.feature:143](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L135) -- [apiWebdavUploadTUS/uploadFile.feature:144](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L136) - [apiWebdavUploadTUS/uploadFile.feature:145](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L137) -- [apiWebdavUploadTUS/uploadFile.feature:146](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L138) -- [apiWebdavUploadTUS/uploadFile.feature:147](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L139) -- [apiWebdavUploadTUS/uploadFile.feature:148](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L140) - [apiWebdavUploadTUS/uploadFile.feature:149](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L141) -- [apiWebdavUploadTUS/uploadFile.feature:150](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L142) #### [upload a file using TUS resource URL as an other user should not work](https://github.com/owncloud/ocis/issues/1141) - [apiWebdavUploadTUS/uploadFile.feature:165](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L155) - [apiWebdavUploadTUS/uploadFile.feature:166](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature#L156) -#### [renaming to banned name works](https://github.com/owncloud/ocis/issues/1295) -- [apiWebdavMove1/moveFolder.feature:21](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L21) -- [apiWebdavMove1/moveFolder.feature:22](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L22) -- [apiWebdavMove1/moveFolder.feature:34](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L34) -- [apiWebdavMove1/moveFolder.feature:35](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L35) -- [apiWebdavMove1/moveFolder.feature:47](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L47) -- [apiWebdavMove1/moveFolder.feature:48](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove1/moveFolder.feature#L48) - #### [Getting information about a folder overwritten by a file gives 500 error instead of 404](https://github.com/owncloud/ocis/issues/1239) - [apiWebdavProperties1/copyFile.feature:134](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavProperties1/copyFile.feature#L134) - [apiWebdavProperties1/copyFile.feature:135](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavProperties1/copyFile.feature#L135) @@ -933,9 +919,6 @@ Scenario Outline: Moving a file to a shared folder with no permissions Scenario Outline: Moving a file to overwrite a file in a shared folder with no permissions - [apiWebdavMove2/moveFile.feature:213](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L213) - [apiWebdavMove2/moveFile.feature:214](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L214) -Scenario Outline: rename a file into an invalid filename -- [apiWebdavMove2/moveFile.feature:234](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L234) -- [apiWebdavMove2/moveFile.feature:235](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L235) Scenario Outline: Checking file id after a move between received shares - [apiWebdavMove2/moveFile.feature:272](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L272) - [apiWebdavMove2/moveFile.feature:273](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavMove2/moveFile.feature#L273) diff --git a/tests/acceptance/features/apiOcisSpecific/apiWebdavMove1-moveFolder.feature b/tests/acceptance/features/apiOcisSpecific/apiWebdavMove1-moveFolder.feature deleted file mode 100644 index 1a86bfde23a..00000000000 --- a/tests/acceptance/features/apiOcisSpecific/apiWebdavMove1-moveFolder.feature +++ /dev/null @@ -1,75 +0,0 @@ -@api @issue-ocis-reva-14 -Feature: move (rename) folder - As a user - I want to be able to move and rename folders - So that I can quickly manage my file system - - Background: - Given using OCS API version "1" - And user "Alice" has been created with default attributes and without skeleton files - - @issue-ocis-reva-211 - # after fixing all issues delete this Scenario and use the one from oC10 core - Scenario Outline: Renaming a folder to a backslash is allowed - Given using DAV path - And user "Alice" has created folder "/testshare" - When user "Alice" moves folder "/testshare" to "\" using the WebDAV API - Then the HTTP status code should be "201" or "500" - Examples: - | dav_version | - | old | - - @issue-ocis-reva-211 @skipOnOcis-OCIS-Storage - # after fixing all issues delete this Scenario and use the one from oC10 core - Scenario Outline: Renaming a folder to a backslash is allowed - Given using DAV path - And user "Alice" has created folder "/testshare" - When user "Alice" moves folder "/testshare" to "\" using the WebDAV API - Then the HTTP status code should be "201" or "500" - Examples: - | dav_version | - | new | - - @issue-ocis-reva-211 - # after fixing all issues delete this Scenario and use the one from oC10 core - Scenario Outline: Renaming a folder beginning with a backslash is allowed - Given using DAV path - And user "Alice" has created folder "/testshare" - When user "Alice" moves folder "/testshare" to "\testshare" using the WebDAV API - Then the HTTP status code should be "201" or "500" - Examples: - | dav_version | - | old | - - @issue-ocis-reva-211 @skipOnOcis-OCIS-Storage - # after fixing all issues delete this Scenario and use the one from oC10 core - Scenario Outline: Renaming a folder beginning with a backslash is allowed - Given using DAV path - And user "Alice" has created folder "/testshare" - When user "Alice" moves folder "/testshare" to "\testshare" using the WebDAV API - Then the HTTP status code should be "201" or "500" - Examples: - | dav_version | - | new | - - @issue-ocis-reva-211 - # after fixing all issues delete this Scenario and use the one from oC10 core - Scenario Outline: Renaming a folder including a backslash encoded is allowed - Given using DAV path - And user "Alice" has created folder "/testshare" - When user "Alice" moves folder "/testshare" to "/hola\hola" using the WebDAV API - Then the HTTP status code should be "201" or "500" - Examples: - | dav_version | - | old | - - @issue-ocis-reva-211 @skipOnOcis-OCIS-Storage - # after fixing all issues delete this Scenario and use the one from oC10 core - Scenario Outline: Renaming a folder including a backslash encoded is allowed - Given using DAV path - And user "Alice" has created folder "/testshare" - When user "Alice" moves folder "/testshare" to "/hola\hola" using the WebDAV API - Then the HTTP status code should be "201" or "500" - Examples: - | dav_version | - | new | diff --git a/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFile.feature b/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFile.feature index caada530f0e..c6741cbf348 100644 --- a/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFile.feature +++ b/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFile.feature @@ -9,18 +9,6 @@ Feature: move (rename) file And user "Alice" has been created with default attributes and without skeleton files And user "Alice" has uploaded file with content "text file 0" to "/textfile0.txt" - @issue-ocis-reva-211 @skipOnOcis-OCIS-Storage - # after fixing all issues delete this Scenario and use the one from oC10 core - Scenario Outline: rename a file into an invalid filename - Given using DAV path - When user "Alice" moves file "/textfile0.txt" to "/a\\a" using the WebDAV API - Then the HTTP status code should be "201" - And as "Alice" file "/a\\a" should exist - Examples: - | dav_version | - | old | - | new | - @issue-ocis-reva-211 @skipOnOcis-OCIS-Storage # after fixing all issues delete this Scenario and use the one from oC10 core Scenario Outline: Renaming a file to a path with extension .part is possible