cmd/inspector: decode path
Change-Id: I5c1eb7842ba5fc76c19c339e5be8f108d3f21fc9
This commit is contained in:
parent
c498e52cf2
commit
a6f0be2047
@ -5,6 +5,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/base64"
|
||||||
"encoding/csv"
|
"encoding/csv"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"flag"
|
"flag"
|
||||||
@ -188,11 +189,14 @@ func ObjectHealth(cmd *cobra.Command, args []string) (err error) {
|
|||||||
fallthrough
|
fallthrough
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
decodedPath, err := base64.URLEncoding.DecodeString(args[2])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
req := &pb.ObjectHealthRequest{
|
req := &pb.ObjectHealthRequest{
|
||||||
ProjectId: []byte(args[0]),
|
ProjectId: []byte(args[0]),
|
||||||
Bucket: []byte(args[1]),
|
Bucket: []byte(args[1]),
|
||||||
EncryptedPath: []byte(args[2]),
|
EncryptedPath: decodedPath,
|
||||||
StartAfterSegment: startAfterSegment,
|
StartAfterSegment: startAfterSegment,
|
||||||
EndBeforeSegment: endBeforeSegment,
|
EndBeforeSegment: endBeforeSegment,
|
||||||
Limit: int32(limit),
|
Limit: int32(limit),
|
||||||
|
Loading…
Reference in New Issue
Block a user