From 967e1c6dff4d99be97720087eb300cdba6c46940 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Wed, 17 Mar 2021 08:31:12 +0100 Subject: [PATCH] remove uuid check --- internal/http/services/owncloud/ocdav/ocdav.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/internal/http/services/owncloud/ocdav/ocdav.go b/internal/http/services/owncloud/ocdav/ocdav.go index c4f05035df..f73ae24944 100644 --- a/internal/http/services/owncloud/ocdav/ocdav.go +++ b/internal/http/services/owncloud/ocdav/ocdav.go @@ -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" @@ -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 { @@ -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],