Skip to content

Commit

Permalink
fix: check if pass is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn-Huang-Tron committed May 29, 2024
1 parent 6043244 commit 0ea49d0
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 0ea49d0

Please sign in to comment.