From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/38584 Path: main.gmane.org!not-for-mail From: Karl Kleinpaste Newsgroups: gmane.emacs.gnus.general Subject: Patch needed: Defense against embedded ^M in Message-Id -- ow! Date: Tue, 04 Sep 2001 08:00:10 -0400 Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035174425 23321 80.91.224.250 (21 Oct 2002 04:27:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:27:05 +0000 (UTC) Keywords: header,carriage return,overview Return-Path: Return-Path: Original-Received: (qmail 17709 invoked from network); 4 Sep 2001 12:00:11 -0000 Original-Received: from mesquite.slip.cs.cmu.edu (HELO cinnamon.vanillaknot.com) (128.2.207.11) by gnus.org with SMTP; 4 Sep 2001 12:00:11 -0000 Original-Received: (from karl@localhost) by cinnamon.vanillaknot.com (8.11.2/8.11.2) id f84C0AT18861; Tue, 4 Sep 2001 08:00:10 -0400 Original-To: ding@gnus.org X-Face: ?=p^Gj2JkX~UU_@W}[q/'Dxn19x-zfIQ](y<&ky/?1-&Nz&,!W}R.Gp+"LeGojoR =RF>?!XVs{a:`Yt(gqM<#$Zy(C@]'dR4Hy4S1.I(n3:2"R:=Uy!)K9>U!gNTyH{p +_w#F[gt).$Vyvo5=9LF^PeQ(@H#}QLAbfyYxX/8t:TDR5nA\|RmJO"EwjL8tWyvM User-Agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.4 (Artificial Intelligence) Original-Lines: 25 Xref: main.gmane.org gmane.emacs.gnus.general:38584 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:38584 --=-=-= I got another screwup in my spam-catcher "tomb" group this morning. Same symptom as before, article expiry choking on an invalid numeric comparison to `>'. I took a closer look, and what I found is fairly horrifying. There are spammers out there whose messages contain a literal carriage return character in the Message-Id header. Take a peek below (and maybe hit `i' twice on its MIME component to get it rendered as text/plain). And that's ignoring entirely the fact that the Message-Id header looks more like a Received header in the first place. --=-=-= Content-Type: message/rfc822 Content-Disposition: inline; filename=8775 Content-Description: header screwup with embedded carriage return X-From-Line: enrda352@hotmail.com Tue Sep 4 07:17:07 2001 Return-Path: Received: from exchange1.rediscom.pt ([194.65.156.50]) by cinnamon.vanillaknot.com (8.11.2/8.11.2) with ESMTP id f84BGq717958 for ; Tue, 4 Sep 2001 07:16:59 -0400 Received: from myrop (208-187-17-200-losangeles.cwia.com [208.187.17.200]) by exchange1.rediscom.pt with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id QS469TZ5; Sat, 25 Aug 2001 20:30:21 +0100 X-Gnus-Mail-Source: file:/var/spool/mail/karl Message-ID: <00004f9a34c1$00001d6e$00006e46@myrop (ew6.southwind.net [216.53.98.70]) by onyx.southwind.net from homepage.com (114.230.197.216) by newmail.spectraweb.ch from default (m202.2-25.warwick.net [218.242.202.80]) byhost.warwick.net (8.10.0.Beta10/8.10.0.Beta10) with SMTP id e9GKEKk19201 > To: From: enrda352@hotmail.com Subject: Targeted E-Mail Marketing Lists............. *f Date: Sat, 25 Aug 2001 18:19:25 -0700 MIME-Version: 1.0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal Errors-To: ertgmsd@concentric.net X-Mailer: Mozilla 4.72 [en] (Win98; U) Keywords: font,color,face,arial,size,align, ,height,narrow,#000000,div,width,left,span,name,#008000,right,center,input,style,sans-s,helvetica,erif,bgcolor,background-color Lines: 2 Xref: cinnamon.vanillaknot.com tomb:8775 --=-=-= This induces an overview file which contains 2 lines, because somewhere along the way Gnus converts the carriage return to a newline. The 2nd line makes for the malformed overview entry, because it begins with that `>'. I would guess that what's needed for this is a patch to turn carriage returns into bland space characters, the way that I expect all headers have tabs converted to spaces to prevent screwing up the tab-separated overview files. Does anyone know precisely where this occurs? A quick peek at nnheader.el wasn't terribly informative. --=-=-=-- From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/38592 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: Patch needed: Defense against embedded ^M in Message-Id -- ow! Date: Tue, 04 Sep 2001 15:50:54 +0200 Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035174431 23351 80.91.224.250 (21 Oct 2002 04:27:11 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:27:11 +0000 (UTC) Cc: ding@gnus.org Return-Path: Return-Path: Original-Received: (qmail 18763 invoked from network); 4 Sep 2001 13:51:22 -0000 Original-Received: from waldorf.cs.uni-dortmund.de (129.217.4.42) by gnus.org with SMTP; 4 Sep 2001 13:51:22 -0000 Original-Received: from lothlorien.cs.uni-dortmund.de (lothlorien.cs.uni-dortmund.de [129.217.19.67]) by waldorf.cs.uni-dortmund.de with ESMTP id PAA10905; Tue, 4 Sep 2001 15:50:55 +0200 (MES) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.19.80]) by lothlorien.cs.uni-dortmund.de id PAA07162; Tue, 4 Sep 2001 15:50:55 +0200 (MET DST) Original-Received: by lucy.cs.uni-dortmund.de (Postfix, from userid 6104) id 546C820B0; Tue, 4 Sep 2001 15:50:54 +0200 (CEST) Original-To: Karl Kleinpaste In-Reply-To: (Karl Kleinpaste's message of "Tue, 04 Sep 2001 08:00:10 -0400") User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.106 Original-Lines: 4 Xref: main.gmane.org gmane.emacs.gnus.general:38592 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:38592 Fwiw, I couldn't see ^M in the headers. kai -- Symbol's function definition is void: signature From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/38594 Path: main.gmane.org!not-for-mail From: Karl Kleinpaste Newsgroups: gmane.emacs.gnus.general Subject: Re: Patch needed: Defense against embedded ^M in Message-Id -- ow! Date: Tue, 04 Sep 2001 10:19:00 -0400 Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035174433 23360 80.91.224.250 (21 Oct 2002 04:27:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:27:13 +0000 (UTC) Return-Path: Return-Path: Original-Received: (qmail 19010 invoked from network); 4 Sep 2001 14:19:06 -0000 Original-Received: from mesquite.slip.cs.cmu.edu (HELO cinnamon.vanillaknot.com) (128.2.207.11) by gnus.org with SMTP; 4 Sep 2001 14:19:06 -0000 Original-Received: (from karl@localhost) by cinnamon.vanillaknot.com (8.11.2/8.11.2) id f84EJ1W23102; Tue, 4 Sep 2001 10:19:01 -0400 Original-To: ding@gnus.org X-Face: "5(T0tZd{6}pd~YzBG8O/*EW,.]6]@`m^e;fv65W^Y&=d"M\1H}>T~4_.kcDD.O~y3k)a6 hR;Nmi>9|>Nm${2IpM0^RcUEa\jcq?KOP)C&~x51l~zCHTulL^_T|u0I^kB'z@]{`2YjQu In-Reply-To: (Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "Tue, 04 Sep 2001 15:50:54 +0200") User-Agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.4 (Artificial Intelligence) Original-Lines: 6 Xref: main.gmane.org gmane.emacs.gnus.general:38594 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:38594 Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes: > Fwiw, I couldn't see ^M in the headers. Message-Id, 2nd-to-last character, column 296. (Unless your transport re-routed that character into oblivion.) It's there in my received-from-list copy. From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/38599 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.emacs.gnus.general Subject: Re: Patch needed: Defense against embedded ^M in Message-Id -- ow! Date: Tue, 04 Sep 2001 11:46:17 -0400 Organization: What did you have in mind? A short, blunt, human pyramid? Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035174437 23379 80.91.224.250 (21 Oct 2002 04:27:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:27:17 +0000 (UTC) Return-Path: Return-Path: Original-Received: (qmail 19812 invoked from network); 4 Sep 2001 15:46:18 -0000 Original-Received: from multivac.student.cwru.edu (HELO multivac.cwru.edu) (261@129.22.96.25) by gnus.org with SMTP; 4 Sep 2001 15:46:18 -0000 Original-Received: (qmail 12409 invoked by uid 500); 4 Sep 2001 15:46:39 -0000 Mail-Followup-To: ding@gnus.org Original-To: ding@gnus.org Mail-Copies-To: never In-Reply-To: (Karl Kleinpaste's message of "Tue, 04 Sep 2001 08:00:10 -0400") User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7 Original-Lines: 21 Xref: main.gmane.org gmane.emacs.gnus.general:38599 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:38599 Karl Kleinpaste wrote: > There are spammers out there whose messages contain a literal carriage > return character in the Message-Id header. ... > Message-ID: <00004f9a34c1$00001d6e$00006e46@myrop (ew6.southwind.net [216.53.98.70]) by onyx.southwind.net from homepage.com (114.230.197.216) by newmail.spectraweb.ch from default (m202.2-25.warwick.net [218.242.202.80]) byhost.warwick.net (8.10.0.Beta10/8.10.0.Beta10) with SMTP id e9GKEKk19201 > Eww. That's ugly, all right. > I would guess that what's needed for this is a patch to turn carriage > returns into bland space characters, the way that I expect all headers > have tabs converted to spaces to prevent screwing up the tab-separated > overview files. I just fixed this same bug in the last version of nnmaildir. It's ok to leave the carriage returns unchanged, but to prevent them from becoming newlines, you have to do this: (let ((nnheader-file-coding-system 'binary) ...) ...) when writing your NOV file. paul From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/38601 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.emacs.gnus.general Subject: Re: Patch needed: Defense against embedded ^M in Message-Id -- ow! Date: Tue, 04 Sep 2001 12:05:43 -0400 Organization: What did you have in mind? A short, blunt, human pyramid? Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035174439 23383 80.91.224.250 (21 Oct 2002 04:27:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:27:19 +0000 (UTC) Return-Path: Return-Path: Original-Received: (qmail 20003 invoked from network); 4 Sep 2001 16:05:44 -0000 Original-Received: from multivac.student.cwru.edu (HELO multivac.cwru.edu) (261@129.22.96.25) by gnus.org with SMTP; 4 Sep 2001 16:05:44 -0000 Original-Received: (qmail 12466 invoked by uid 500); 4 Sep 2001 16:06:06 -0000 Mail-Followup-To: ding@gnus.org Original-To: ding@gnus.org Mail-Copies-To: never In-Reply-To: (prj@po.cwru.edu's message of "Tue, 04 Sep 2001 11:46:17 -0400") User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7 Original-Lines: 22 Xref: main.gmane.org gmane.emacs.gnus.general:38601 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:38601 I wrote: > I just fixed this same bug in the last version of nnmaildir. It's ok > to leave the carriage returns unchanged, but to prevent them from > becoming newlines, you have to do this: > (let ((nnheader-file-coding-system 'binary) ...) ...) > when writing your NOV file. Er, when *reading* the NOV file. And assuming you're using nnheader-insert-file-contents to do it. In the cases I found, the carriage returns would be preserved when the message file was read, because there were some lines that didn't have them, so the magic coding-system stuff didn't kick in. They were also written correctly to the NOV file, but then when they were reread, there were only carriage returns and no newlines, so carriage return was converted to newline. Hm. But other backends' NOV files *do* have newlines. So maybe the fix will be slightly different. paul From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/38604 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: Patch needed: Defense against embedded ^M in Message-Id -- ow! Date: Tue, 04 Sep 2001 19:02:22 +0200 Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1035174441 23400 80.91.224.250 (21 Oct 2002 04:27:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:27:21 +0000 (UTC) Cc: ding@gnus.org Return-Path: Return-Path: Original-Received: (qmail 20689 invoked from network); 4 Sep 2001 17:02:49 -0000 Original-Received: from waldorf.cs.uni-dortmund.de (129.217.4.42) by gnus.org with SMTP; 4 Sep 2001 17:02:49 -0000 Original-Received: from lothlorien.cs.uni-dortmund.de (lothlorien.cs.uni-dortmund.de [129.217.19.67]) by waldorf.cs.uni-dortmund.de with ESMTP id TAA17905; Tue, 4 Sep 2001 19:02:22 +0200 (MES) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.19.80]) by lothlorien.cs.uni-dortmund.de id TAA09301; Tue, 4 Sep 2001 19:02:22 +0200 (MET DST) Original-Received: by lucy.cs.uni-dortmund.de (Postfix, from userid 6104) id 5A94E20B0; Tue, 4 Sep 2001 19:02:22 +0200 (CEST) Original-To: Karl Kleinpaste In-Reply-To: (Karl Kleinpaste's message of "Tue, 04 Sep 2001 10:19:00 -0400") User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.106 Original-Lines: 15 Xref: main.gmane.org gmane.emacs.gnus.general:38604 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:38604 Karl Kleinpaste writes: > Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Gro=DFjohann) writes: > > Fwiw, I couldn't see ^M in the headers. > > Message-Id, 2nd-to-last character, column 296. > (Unless your transport re-routed that character into oblivion.) > It's there in my received-from-list copy. Something was `friendly' enough to remove it. I did `o' on the part and then looked in the file -- no ^M there. kai --=20 Symbol's function definition is void: signature