Skip to content

Commit

Permalink
remove uuid check
Browse files Browse the repository at this point in the history
  • Loading branch information
wkloucek committed Mar 22, 2021
1 parent 246a1a3 commit 967e1c6
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions internal/http/services/owncloud/ocdav/ocdav.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import (
"github.com/cs3org/reva/pkg/sharedconf"
"github.com/cs3org/reva/pkg/storage/utils/templates"
ctxuser "github.com/cs3org/reva/pkg/user"
"github.com/google/uuid"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
"github.com/rs/zerolog"
Expand Down Expand Up @@ -218,11 +217,6 @@ func wrap(sid string, oid string) string {
return base64.URLEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", sid, oid)))
}

func isValidUUID(u string) bool {
_, err := uuid.Parse(u)
return err == nil
}

func unwrap(rid string) *provider.ResourceId {
decodedID, err := base64.URLEncoding.DecodeString(rid)
if err != nil {
Expand All @@ -238,10 +232,6 @@ func unwrap(rid string) *provider.ResourceId {
return nil
}

if !isValidUUID(parts[0]) || !isValidUUID(parts[1]) {
return nil
}

return &provider.ResourceId{
StorageId: parts[0],
OpaqueId: parts[1],
Expand Down

0 comments on commit 967e1c6

Please sign in to comment.