Skip to content

Commit

Permalink
Merge pull request #433 from bittorrent/fix/from-empty
Browse files Browse the repository at this point in the history
fix: check if pass is empty
  • Loading branch information
Shawn-Huang-Tron authored May 29, 2024
2 parents 53c8d0c + 0ea49d0 commit 4f70612
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/commands/encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ var decryptCmd = &cmds.Command{

var decryptedData []byte
pass, ok := r.Options[passOption].(string)
if ok {
if ok && strings.TrimSpace(pass) != "" {
// That means it's symmetrical encryption
hasher := md5.New()
hasher.Write([]byte(pass))
Expand Down

0 comments on commit 4f70612

Please sign in to comment.