Skip to content

Commit 2a11580

Browse files
committed
fix ut
1 parent f3d6beb commit 2a11580

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ func verifyAuthTicket(ctx context.Context, authTokenString string, allocationObj
3131
if err != nil {
3232
return nil, err
3333
}
34-
prefixPath := authTokenRef.Path + "/"
34+
prefixPath := authTokenRef.Path
35+
if prefixPath != "/" {
36+
prefixPath += "/"
37+
}
3538
if !strings.HasPrefix(refRequested.Path, prefixPath) {
3639
return nil, common.NewError("invalid_parameters", "Auth ticket is not valid for the resource being requested")
3740
}

0 commit comments

Comments
 (0)