diff --git a/go.mod b/go.mod index bcf4e30ec..2d4c86bbe 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/coreos/go-oidc v2.2.1+incompatible github.com/coreos/go-oidc/v3 v3.7.0 github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781 - github.com/cs3org/reva/v2 v2.16.1-0.20231031092154-9f40f0453b34 + github.com/cs3org/reva/v2 v2.16.1-0.20231107141341-4b08a8b754e7 github.com/dhowden/tag v0.0.0-20230630033851-978a0926ee25 github.com/disintegration/imaging v1.6.2 github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e diff --git a/go.sum b/go.sum index 7834c7e2b..61d1cef48 100644 --- a/go.sum +++ b/go.sum @@ -1013,8 +1013,8 @@ github.com/crewjam/saml v0.4.14 h1:g9FBNx62osKusnFzs3QTN5L9CVA/Egfgm+stJShzw/c= github.com/crewjam/saml v0.4.14/go.mod h1:UVSZCf18jJkk6GpWNVqcyQJMD5HsRugBPf4I1nl2mME= github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781 h1:BUdwkIlf8IS2FasrrPg8gGPHQPOrQ18MS1Oew2tmGtY= github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= -github.com/cs3org/reva/v2 v2.16.1-0.20231031092154-9f40f0453b34 h1:fgJV6Ad4nMZakeFWgSnPSeReyMB1RN6PEV8jAjw3vdQ= -github.com/cs3org/reva/v2 v2.16.1-0.20231031092154-9f40f0453b34/go.mod h1:utPCNSrWDdAwz2biLrKvzO6nDH9L7vRVGNzof13r8Kw= +github.com/cs3org/reva/v2 v2.16.1-0.20231107141341-4b08a8b754e7 h1:NmISK1T/c/1hDfOiGqPEVAOq3BTxWzIe2+bn3TtrzzU= +github.com/cs3org/reva/v2 v2.16.1-0.20231107141341-4b08a8b754e7/go.mod h1:utPCNSrWDdAwz2biLrKvzO6nDH9L7vRVGNzof13r8Kw= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= diff --git a/tests/acceptance/expected-failures-API-on-OCIS-storage.md b/tests/acceptance/expected-failures-API-on-OCIS-storage.md index 0c727e942..874b1b564 100644 --- a/tests/acceptance/expected-failures-API-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-API-on-OCIS-storage.md @@ -162,7 +162,6 @@ File and sync features in a shared scenario - [coreApiShareManagementToShares/mergeShare.feature:112](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/mergeShare.feature#L112) - [coreApiShareManagementToShares/mergeShare.feature:132](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/mergeShare.feature#L132) - #### [File deletion using dav gives unique string in filename in the trashbin](https://github.com/owncloud/product/issues/178) - [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:58](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L58) diff --git a/tests/acceptance/features/apiSpacesShares/etagPropagation.feature b/tests/acceptance/features/apiSpacesShares/etagPropagation.feature index 00ad968e9..b64842f13 100644 --- a/tests/acceptance/features/apiSpacesShares/etagPropagation.feature +++ b/tests/acceptance/features/apiSpacesShares/etagPropagation.feature @@ -136,29 +136,6 @@ Feature: check etag propagation after different file alterations | Brian | /dst | Shares | - Scenario: share receiver moving a file from one folder to an other changes the etags of both folders for all collaborators - Given user "Alice" has created folder "/dst" - And user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" - And user "Alice" has shared folder "/upload" with user "Brian" - And user "Alice" has shared folder "/dst" with user "Brian" - And user "Alice" has stored etag of element "/" inside space "Personal" - And user "Alice" has stored etag of element "/upload" inside space "Personal" - And user "Alice" has stored etag of element "/dst" inside space "Personal" - And user "Brian" has stored etag of element "/" inside space "Shares" - And user "Brian" has stored etag of element "/upload" inside space "Shares" - And user "Brian" has stored etag of element "/dst" inside space "Shares" - When user "Brian" moves file "/upload/file.txt" to "/dst/file.txt" in space "Shares" using the WebDAV API - Then the HTTP status code should be "201" - And these etags should have changed - | user | path | space | - | Alice | / | Personal | - | Alice | /upload | Personal | - | Alice | /dst | Personal | - | Brian | / | Shares | - | Brian | /upload | Shares | - | Brian | /dst | Shares | - - Scenario: sharer moving a folder from one folder to an other changes the etags of both folders for all collaborators Given user "Alice" has created folder "/dst" And user "Alice" has created folder "/upload/toMove" @@ -182,29 +159,6 @@ Feature: check etag propagation after different file alterations | Brian | /dst | Shares | - Scenario: share receiver moving a folder from one folder to an other changes the etags of both folders for all collaborators - Given user "Alice" has created folder "/dst" - And user "Alice" has created folder "/upload/toMove" - And user "Alice" has shared folder "/upload" with user "Brian" - And user "Alice" has shared folder "/dst" with user "Brian" - And user "Alice" has stored etag of element "/" inside space "Personal" - And user "Alice" has stored etag of element "/upload" inside space "Personal" - And user "Alice" has stored etag of element "/dst" inside space "Personal" - And user "Brian" has stored etag of element "/" inside space "Shares" - And user "Brian" has stored etag of element "/upload" inside space "Shares" - And user "Brian" has stored etag of element "/dst" inside space "Shares" - When user "Brian" moves file "/upload/toMove" to "/dst/toMove" in space "Shares" using the WebDAV API - Then the HTTP status code should be "201" - And these etags should have changed - | user | path | space | - | Alice | / | Personal | - | Alice | /upload | Personal | - | Alice | /dst | Personal | - | Brian | / | Shares | - | Brian | /upload | Shares | - | Brian | /dst | Shares | - - Scenario: share receiver creating a folder inside a folder received as a share changes its etag for all collaborators Given user "Alice" has shared folder "/upload" with user "Brian" And user "Alice" has stored etag of element "/" inside space "Personal" diff --git a/tests/acceptance/features/apiSpacesShares/moveSpaces.feature b/tests/acceptance/features/apiSpacesShares/moveSpaces.feature index 84709950e..fbd137319 100644 --- a/tests/acceptance/features/apiSpacesShares/moveSpaces.feature +++ b/tests/acceptance/features/apiSpacesShares/moveSpaces.feature @@ -208,12 +208,10 @@ Feature: move (rename) file And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "31" And user "Brian" has shared folder "/testshare2" with user "Alice" with permissions "31" When user "Alice" moves file "/testshare1/testshare1.txt" from space "Shares" to "/testshare2/testshare1.txt" inside space "Shares" using the WebDAV API - Then the HTTP status code should be "201" - And for user "Alice" folder "testshare2" of the space "Shares" should contain these entries: + Then the HTTP status code should be "502" + And for user "Alice" folder "testshare1" of the space "Shares" should contain these entries: | testshare1.txt | - And for user "Brian" folder "testshare2" of the space "Personal" should contain these entries: - | testshare1.txt | - But for user "Alice" folder "testshare1" of the space "Shares" should not contain these entries: + But for user "Alice" folder "testshare2" of the space "Shares" should not contain these entries: | testshare1.txt | @@ -224,10 +222,10 @@ Feature: move (rename) file And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "31" And user "Brian" has shared folder "/testshare2" with user "Alice" with permissions "17" When user "Alice" moves file "/testshare1/testshare1.txt" from space "Shares" to "/testshare2/testshare1.txt" inside space "Shares" using the WebDAV API - Then the HTTP status code should be "403" - And for user "Alice" folder "testshare2" of the space "Shares" should not contain these entries: + Then the HTTP status code should be "502" + And for user "Alice" folder "testshare1" of the space "Shares" should contain these entries: | testshare1.txt | - And for user "Brian" folder "testshare2" of the space "Personal" should not contain these entries: + But for user "Alice" folder "testshare2" of the space "Shares" should not contain these entries: | testshare1.txt | @@ -238,34 +236,13 @@ Feature: move (rename) file And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "17" And user "Brian" has shared folder "/testshare2" with user "Alice" with permissions "31" When user "Alice" moves file "/testshare1/testshare1.txt" from space "Shares" to "/testshare2/testshare1.txt" inside space "Shares" using the WebDAV API - Then the HTTP status code should be "403" - And for user "Alice" folder "testshare2" of the space "Shares" should not contain these entries: + Then the HTTP status code should be "502" + And for user "Alice" folder "testshare1" of the space "Shares" should contain these entries: | testshare1.txt | - And for user "Brian" folder "testshare2" of the space "Personal" should not contain these entries: + But for user "Alice" folder "testshare2" of the space "Shares" should not contain these entries: | testshare1.txt | - Scenario: checking file id after a move between received shares - Given user "Alice" has created the following folders - | path | - | /folderA | - | /folderB | - And user "Alice" has shared folder "/folderA" with user "Brian" - And user "Alice" has shared folder "/folderB" with user "Brian" - And user "Brian" has created a folder "/folderA/ONE" in space "Shares" - And user "Brian" has created a folder "/folderA/ONE/TWO" in space "Shares" - And user "Brian" has stored id of folder "/folderA/ONE" of the space "Shares" - When user "Brian" moves folder "/folderA/ONE" from space "Shares" to "/folderB/ONE" inside space "Shares" using the WebDAV API - Then the HTTP status code should be "201" - And for user "Brian" the space "Shares" should contain these entries: - | /folderA | - And for user "Brian" folder "folderB" of the space "Shares" should contain these entries: - | /ONE | - And for user "Brian" folder "folderA" of the space "Shares" should not contain these entries: - | /ONE | - And user "Brian" folder "/folderB/ONE" of the space "Shares" should have the previously stored id - - Scenario: moving a file out of a shared folder as a sharer Given user "Brian" has created folder "/testshare" And user "Brian" has uploaded file with content "test data" to "/testshare/testfile.txt" diff --git a/tests/acceptance/features/coreApiShareOperationsToShares1/changingFilesShare.feature b/tests/acceptance/features/coreApiShareOperationsToShares1/changingFilesShare.feature index 76ff34cbe..5add6e651 100644 --- a/tests/acceptance/features/coreApiShareOperationsToShares1/changingFilesShare.feature +++ b/tests/acceptance/features/coreApiShareOperationsToShares1/changingFilesShare.feature @@ -35,11 +35,11 @@ Feature: sharing And user "Alice" has shared folder "/share1" with user "Brian" And user "Alice" has shared folder "/share2" with user "Brian" When user "Brian" moves file "/Shares/share1/textfile0.txt" to "/Shares/share2/textfile0.txt" using the WebDAV API - Then the HTTP status code should be "201" - And as "Brian" file "/Shares/share1/textfile0.txt" should not exist - But as "Brian" file "/Shares/share2/textfile0.txt" should exist - And as "Alice" file "share1/textfile0.txt" should not exist - But as "Alice" file "share2/textfile0.txt" should exist + Then the HTTP status code should be "502" + And as "Brian" file "/Shares/share1/textfile0.txt" should exist + And as "Alice" file "share1/textfile0.txt" should exist + But as "Brian" file "/Shares/share2/textfile0.txt" should not exist + And as "Alice" file "share2/textfile0.txt" should not exist Examples: | dav-path-version | | old | diff --git a/tests/acceptance/features/coreApiWebdavEtagPropagation1/moveFileFolder.feature b/tests/acceptance/features/coreApiWebdavEtagPropagation1/moveFileFolder.feature index 22e2999ac..713af86ad 100644 --- a/tests/acceptance/features/coreApiWebdavEtagPropagation1/moveFileFolder.feature +++ b/tests/acceptance/features/coreApiWebdavEtagPropagation1/moveFileFolder.feature @@ -240,38 +240,6 @@ Feature: propagation of etags when moving files or folders | old | | new | - @skipOnReva - Scenario Outline: sharee moving a file from one folder to an other changes the etags of both folders for all collaborators - Given user "Brian" has been created with default attributes and without skeleton files - And using DAV path - And user "Alice" has created folder "/src" - And user "Alice" has created folder "/dst" - And user "Alice" has uploaded file with content "uploaded content" to "/src/file.txt" - And user "Alice" has shared folder "/src" with user "Brian" - And user "Alice" has shared folder "/dst" with user "Brian" - And user "Alice" has stored etag of element "/" - And user "Alice" has stored etag of element "/src" - And user "Alice" has stored etag of element "/dst" - And user "Brian" has stored etag of element "/" - And user "Brian" has stored etag of element "/Shares" - And user "Brian" has stored etag of element "/Shares/src" - And user "Brian" has stored etag of element "/Shares/dst" - When user "Brian" moves file "/Shares/src/file.txt" to "/Shares/dst/file.txt" using the WebDAV API - Then the HTTP status code should be "201" - And these etags should have changed: - | user | path | - | Alice | / | - | Alice | /src | - | Alice | /dst | - | Brian | / | - | Brian | /Shares | - | Brian | /Shares/src | - | Brian | /Shares/dst | - Examples: - | dav-path-version | - | old | - | new | - @issue-4251 @skipOnReva Scenario Outline: sharer moving a folder from one folder to an other changes the etags of both folders for all collaborators Given user "Brian" has been created with default attributes and without skeleton files @@ -304,38 +272,6 @@ Feature: propagation of etags when moving files or folders | old | | new | - @skipOnReva - Scenario Outline: sharee moving a folder from one folder to an other changes the etags of both folders for all collaborators - Given user "Brian" has been created with default attributes and without skeleton files - And using DAV path - And user "Alice" has created folder "/src" - And user "Alice" has created folder "/dst" - And user "Alice" has created folder "/src/toMove" - And user "Alice" has shared folder "/src" with user "Brian" - And user "Alice" has shared folder "/dst" with user "Brian" - And user "Alice" has stored etag of element "/" - And user "Alice" has stored etag of element "/src" - And user "Alice" has stored etag of element "/dst" - And user "Brian" has stored etag of element "/" - And user "Brian" has stored etag of element "/Shares" - And user "Brian" has stored etag of element "/Shares/src" - And user "Brian" has stored etag of element "/Shares/dst" - When user "Brian" moves folder "/Shares/src/toMove" to "/Shares/dst/toMove" using the WebDAV API - Then the HTTP status code should be "201" - And these etags should have changed: - | user | path | - | Alice | / | - | Alice | /src | - | Alice | /dst | - | Brian | / | - | Brian | /Shares | - | Brian | /Shares/src | - | Brian | /Shares/dst | - Examples: - | dav-path-version | - | old | - | new | - Scenario Outline: renaming a file in a publicly shared folder changes its etag for the sharer Given using DAV path diff --git a/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature b/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature index 15c3e7b99..1640605b2 100644 --- a/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature +++ b/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature @@ -181,31 +181,3 @@ Feature: move (rename) file | dav-path-version | | old | | new | - - @skipOnReva - Scenario Outline: checking file id after a move between received shares - Given using DAV path - And user "Brian" has been created with default attributes and without skeleton files - And user "Alice" has created the following folders - | path | - | /folderA | - | /folderB | - And user "Alice" has shared folder "/folderA" with user "Brian" - And user "Alice" has shared folder "/folderB" with user "Brian" - And user "Brian" has created the following folders - | path | - | /Shares/folderA/ONE | - | /Shares/folderA/ONE/TWO | - And user "Brian" has stored id of folder "/Shares/folderA/ONE" - When user "Brian" moves folder "/Shares/folderA/ONE" to "/Shares/folderB/ONE" using the WebDAV API - Then the HTTP status code should be "201" - And as "Brian" folder "/Shares/folderA" should exist - And as "Brian" folder "/Shares/folderA/ONE" should not exist - And as "Brian" folder "/Shares/folderA/ONE/TWO" should not exist - And as "Brian" folder "/Shares/folderB/ONE" should exist - And as "Brian" folder "/Shares/folderB/ONE/TWO" should exist - And user "Brian" folder "/Shares/folderB/ONE" should have the previously stored id - Examples: - | dav-path-version | - | old | - | new | diff --git a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go index e363aec26..207992f51 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go +++ b/vendor/github.com/cs3org/reva/v2/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go @@ -643,9 +643,10 @@ func (s *service) Move(ctx context.Context, req *provider.MoveRequest) (*provide Status: rpcStatus, }, nil } - if srcReceivedShare.Share.ResourceId.SpaceId != dstReceivedShare.Share.ResourceId.SpaceId { + + if dstReceivedShare.Share.Id.OpaqueId != srcReceivedShare.Share.Id.OpaqueId { return &provider.MoveResponse{ - Status: status.NewInvalid(ctx, "sharesstorageprovider: can not move between shares on different storages"), + Status: status.NewUnimplemented(ctx, nil, "sharesstorageprovider: can not move between shares"), }, nil } diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/sciencemesh.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/sciencemesh.go index 67b2f902a..e98d49d9f 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/sciencemesh.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/sciencemesh/sciencemesh.go @@ -105,7 +105,7 @@ func (s *svc) routerInit() error { return err } - s.router.Get("/generate-invite", tokenHandler.Generate) + s.router.Post("/generate-invite", tokenHandler.Generate) s.router.Get("/list-invite", tokenHandler.ListInvite) s.router.Post("/accept-invite", tokenHandler.AcceptInvite) s.router.Get("/find-accepted-users", tokenHandler.FindAccepted) diff --git a/vendor/github.com/cs3org/reva/v2/pkg/ocm/provider/authorizer/json/json.go b/vendor/github.com/cs3org/reva/v2/pkg/ocm/provider/authorizer/json/json.go index a1d11074e..b2173c6b7 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/ocm/provider/authorizer/json/json.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/ocm/provider/authorizer/json/json.go @@ -163,7 +163,11 @@ func (a *authorizer) IsProviderAllowed(ctx context.Context, pi *ocmprovider.Prov if hostIPs, ok := a.providerIPs.Load(ocmHost); ok { ipList = hostIPs.([]string) } else { - addr, err := net.LookupIP(ocmHost) + host, _, err := net.SplitHostPort(ocmHost) + if err != nil { + return errors.Wrap(err, "json: error looking up client IP") + } + addr, err := net.LookupIP(host) if err != nil { return errors.Wrap(err, "json: error looking up client IP") } diff --git a/vendor/modules.txt b/vendor/modules.txt index 49901eab6..afd2dc39c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -357,7 +357,7 @@ github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1 github.com/cs3org/go-cs3apis/cs3/storage/registry/v1beta1 github.com/cs3org/go-cs3apis/cs3/tx/v1beta1 github.com/cs3org/go-cs3apis/cs3/types/v1beta1 -# github.com/cs3org/reva/v2 v2.16.1-0.20231031092154-9f40f0453b34 +# github.com/cs3org/reva/v2 v2.16.1-0.20231107141341-4b08a8b754e7 ## explicit; go 1.20 github.com/cs3org/reva/v2/cmd/revad/internal/grace github.com/cs3org/reva/v2/cmd/revad/runtime