Skip to content

Commit

Permalink
storage presign: fix panic when parsing arg[0] (#590)
Browse files Browse the repository at this point in the history
Fixes #588
  • Loading branch information
sauterp authored Apr 15, 2024
1 parent 032b0d2 commit 07481ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Changelog

## Unrelease
## Unreleased

- Block Storage: Fix volume show with snapshot #589
- storage presign: fix panic when parsing arg[0] #590

## 1.77.1

Expand Down
3 changes: 3 additions & 0 deletions cmd/storage_presign.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ var storagePresignCmd = &cobra.Command{
}

parts := strings.SplitN(args[0], "/", 2)
if len(parts) < 2 {
return fmt.Errorf("invalid object URL: %q", args[0])
}
bucket, key = parts[0], parts[1]

storage, err := sos.NewStorageClient(
Expand Down

0 comments on commit 07481ec

Please sign in to comment.