]> code.delx.au - gnu-emacs/commitdiff
Compare recipient and keys case-insensitively
authorDavid Edmondson <dme@dme.org>
Mon, 8 Feb 2016 23:26:52 +0000 (10:26 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 8 Feb 2016 23:27:03 +0000 (10:27 +1100)
* lisp/gnus/mml2015.el: (mml-secure-check-user-id): When comparing a
recipient address with that from a key, do so in a case insensitive
manner (bug#22603).

lisp/gnus/mml-sec.el

index 48e6384497e1dc320df1d5dcc3f6f838693ad5e9..3ac3da0127d1c45e105c09cc92295e0e5ca2532d 100644 (file)
@@ -655,10 +655,10 @@ The passphrase is read and cached."
     (catch 'break
       (dolist (uid uids nil)
        (if (and (stringp (epg-user-id-string uid))
-                (equal (car (mail-header-parse-address
-                             (epg-user-id-string uid)))
-                       (car (mail-header-parse-address
-                             recipient)))
+                (equal (downcase (car (mail-header-parse-address
+                                       (epg-user-id-string uid))))
+                       (downcase (car (mail-header-parse-address
+                                       recipient))))
                 (not (memq (epg-user-id-validity uid)
                            '(revoked expired))))
            (throw 'break t))))))