]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge from gnus--rel--5.10
authorMiles Bader <miles@gnu.org>
Mon, 20 Nov 2006 02:43:10 +0000 (02:43 +0000)
committerMiles Bader <miles@gnu.org>
Mon, 20 Nov 2006 02:43:10 +0000 (02:43 +0000)
Patches applied:

 * gnus--rel--5.10  (patch 167)

   - Update from CVS

2006-11-18  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>

   * lisp/gnus/mm-uu.el (mm-uu-pgp-signed-extract-1): Make last fix more thorough
   and comment it.

   * lisp/gnus/nnslashdot.el (nnslashdot-retrieve-headers-1): Update regexp.

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-518

lisp/gnus/ChangeLog
lisp/gnus/mm-uu.el
lisp/gnus/nnslashdot.el

index 95e8bff4d1658445d2ed5e1db8b771e8a363ab9c..196c0e6ff71077e5026f9853f00daa0e3f658758 100644 (file)
@@ -1,3 +1,10 @@
+2006-11-18  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>
+
+       * mm-uu.el (mm-uu-pgp-signed-extract-1): Make last fix more thorough
+       and comment it.
+
+       * nnslashdot.el (nnslashdot-retrieve-headers-1): Update regexp.
+
 2006-11-15  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus-util.el (gnus-extract-address-components): Improve comment.
index b1ed0b7af4e6fa648cc68d7fe3762503211aae2d..311dce0d1b2d7de127366d94bde361c67e2b5515 100644 (file)
@@ -373,8 +373,16 @@ Return that buffer."
           mm-security-handle 'gnus-details
           (format "Clear verification not supported by `%s'.\n" mml2015-use))))
       (goto-char (point-min))
-      (if (re-search-forward "\n[\t ]*\n" nil t)
-         (delete-region (point-min) (point)))
+      (forward-line)
+      ;; We need to be careful not to strip beyond the armor headers.
+      ;; Previously, an attacker could replace the text inside our
+      ;; markup with trailing garbage by injecting whitespace into the
+      ;; message.
+      (while (looking-at "Hash:") ; The only header allowed in cleartext
+       (forward-line))           ; signatures according to RFC2440.
+      (when (looking-at "[\t ]*$")
+       (forward-line))
+      (delete-region (point-min) (point))
       (if (re-search-forward mm-uu-pgp-beginning-signature nil t)
          (delete-region (match-beginning 0) (point-max)))
       (goto-char (point-min))
index 37ecaf0f32b7f04906d72190af1dce07b5bf5825..0b19fd0ead61ebfcfe82519ad74f37cf56c487c1 100644 (file)
          (setq article (if (and article (< start article)) article start))
          (goto-char point)
          (while (re-search-forward
-                 "<a name=\"\\([0-9]+\\)\">\\([^<]+\\)</a>.*\n.*\n.*score:\\([^)]+\\))"
+                 "<a name=\"\\([0-9]+\\)\">\\([^<]+\\)\\(?:.*\n\\)\\{2,10\\}.*score:\\([^)]+\\))"
                  nil t)
            (setq cid (match-string 1)
                  subject (match-string 2)