]> code.delx.au - gnu-emacs/commitdiff
Properly reject malformed or empty package sigs
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 14 May 2016 01:23:05 +0000 (18:23 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 14 May 2016 01:23:37 +0000 (18:23 -0700)
Problem report and fix by Lizzie Dixon (Bug#23513).
* lisp/emacs-lisp/package.el (package--check-signature-content):
Report an error if no good signatures OR if a fatal error.  Not AND.
Copyright-paperwork-exempt: yes

lisp/emacs-lisp/package.el

index 5371f0b9e55f0ea43021576204dd7dad66167b43..58973dfa920809e4896d1ebdd2534b1f32de699a 100644 (file)
@@ -1214,7 +1214,7 @@ errors."
           (unless (and (eq package-check-signature 'allow-unsigned)
                        (eq (epg-signature-status sig) 'no-pubkey))
             (setq had-fatal-error t))))
-      (when (and (null good-signatures) had-fatal-error)
+      (when (or (null good-signatures) had-fatal-error)
         (package--display-verify-error context sig-file)
         (signal 'bad-signature (list sig-file)))
       good-signatures)))