Skip to content

Commit

Permalink
Fix publiclinks and decomposedfs (#2445)
Browse files Browse the repository at this point in the history
* decomposedfs: don't check id's containing "/"

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* add changelog

Signed-off-by: jkoberg <jkoberg@owncloud.com>
  • Loading branch information
kobergj authored and butonic committed Feb 14, 2022
1 parent c4d0c64 commit b061960
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions changelog/unreleased/fix-id-checking-in-decomposedfs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Bugfix: Don't handle ids containing "/" in decomposedfs

The storageprovider previously checked all ids without checking their validity
this lead to flaky test because it shouldn't check ids that are used from the
public storage provider

https://github.com/cs3org/reva/pull/2445

4 changes: 4 additions & 0 deletions pkg/storage/utils/decomposedfs/spaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"os"
"path/filepath"
"strconv"
"strings"

userv1beta1 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
v1beta11 "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
Expand Down Expand Up @@ -195,6 +196,9 @@ func (fs *Decomposedfs) ListStorageSpaces(ctx context.Context, filter []*provide
}
case provider.ListStorageSpacesRequest_Filter_TYPE_ID:
spaceID, nodeID, _ = utils.SplitStorageSpaceID(filter[i].GetId().OpaqueId)
if strings.Contains(nodeID, "/") {
return []*provider.StorageSpace{}, nil
}
}
}
if len(spaceTypes) == 0 {
Expand Down

0 comments on commit b061960

Please sign in to comment.