Skip to content

Commit f3d6beb

Browse files
committed
only check path
1 parent 17635df commit f3d6beb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

code/go/0chain.net/blobbercore/handler/authticket.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,10 @@ func verifyAuthTicket(ctx context.Context, authTokenString string, allocationObj
2727
}
2828

2929
if refRequested.LookupHash != authToken.FilePathHash {
30-
authTokenRef, err := reference.GetLimitedRefFieldsByLookupHashWith(ctx, authToken.AllocationID, authToken.FilePathHash, []string{"id", "path", "type"})
30+
authTokenRef, err := reference.GetLimitedRefFieldsByLookupHashWith(ctx, authToken.AllocationID, authToken.FilePathHash, []string{"id", "path"})
3131
if err != nil {
3232
return nil, err
3333
}
34-
if authTokenRef.Type == reference.FILE {
35-
return nil, common.NewError("invalid_parameters", "Auth ticket is not valid for the resource being requested")
36-
}
3734
prefixPath := authTokenRef.Path + "/"
3835
if !strings.HasPrefix(refRequested.Path, prefixPath) {
3936
return nil, common.NewError("invalid_parameters", "Auth ticket is not valid for the resource being requested")

0 commit comments

Comments
 (0)