mirror of
https://github.com/nishiki/manage-password.git
synced 2025-02-20 01:50:04 +00:00
no try to decrypt if data is empty
This commit is contained in:
parent
ca2225ce71
commit
77a8a7695a
1 changed files with 2 additions and 0 deletions
|
@ -486,6 +486,8 @@ class MPW
|
|||
# @args: data -> string to decrypt
|
||||
private
|
||||
def decrypt(data)
|
||||
return nil if data.to_s.empty?
|
||||
|
||||
crypto = GPGME::Crypto.new(armor: true)
|
||||
|
||||
return crypto.decrypt(data, password: @gpg_pass).read.force_encoding('utf-8')
|
||||
|
|
Loading…
Add table
Reference in a new issue