diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-09-21 07:12:35 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-09-21 07:12:35 +0200 |
commit | 8c4cb2fe069ff1bc1ab8b2166e2d6dbafe96048c (patch) | |
tree | 90fb5d747b38c117a7935467808e18c796a91a18 /lisp/epg.el | |
parent | a202f6a39a36e871937d161112dfb1777adbcfe6 (diff) | |
download | emacs-8c4cb2fe069ff1bc1ab8b2166e2d6dbafe96048c.tar.gz emacs-8c4cb2fe069ff1bc1ab8b2166e2d6dbafe96048c.tar.bz2 emacs-8c4cb2fe069ff1bc1ab8b2166e2d6dbafe96048c.zip |
Fix problems with non-ASCII non-encoded PGP names
* lisp/epg.el (epg-signature-to-string): User IDs may be
non-encoded, non-ASCII (bug#50706).
Diffstat (limited to 'lisp/epg.el')
-rw-r--r-- | lisp/epg.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/epg.el b/lisp/epg.el index a461afac34b..1d37cbcfb57 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -433,7 +433,11 @@ callback data (if any)." (and user-id (concat " " (if (stringp user-id) - (rfc6068-unhexify-string user-id) + (if (= (length user-id) (string-bytes user-id)) + ;; This is ASCII, possibly %-encoded. + (rfc6068-unhexify-string user-id) + ;; Non-ASCII, return as is. + user-id) (epg-decode-dn user-id)))) (and (epg-signature-validity signature) (format " (trust %s)" (epg-signature-validity signature))) |