Re-import user's pubkey on access
Sometimes, the pubkey might not be imported in the local keychain (anymore), but at this point in the code it had been successfully imported at least once before. So we just (re-)import every time for it to never fail.
This commit is contained in:
parent
729e4fd566
commit
3ee76e26ab
@ -174,7 +174,8 @@ class User < ApplicationRecord
|
|||||||
|
|
||||||
def gnupg_key
|
def gnupg_key
|
||||||
return nil unless pgp_pubkey.present?
|
return nil unless pgp_pubkey.present?
|
||||||
@gnupg_key ||= GPGME::Key.get(pgp_fpr)
|
GPGME::Key.import(pgp_pubkey)
|
||||||
|
GPGME::Key.get(pgp_fpr)
|
||||||
end
|
end
|
||||||
|
|
||||||
def pgp_pubkey_contains_user_address?
|
def pgp_pubkey_contains_user_address?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user