From:	AITGW::"fenner%JAZZ.PSU.EDU@VM1.NoDak.EDU" "Bill Fenner"  5-SEP-1991 21:12:10.62
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
CC:	
Subj:	Re: Noxious Formatting (was Trying to install ... )

Received: by AITGW.DECnet (utk-mail11 v1.5) ; Thu, 5 Sep 91 21:12:06 EDT
Received: from vm1.NoDak.edu by aitgw.ge.com (5.61/GE Gateway 1.3T)
	id AA02991; Thu, 5 Sep 91 21:11:55 -0400
Message-Id: <9109060111.AA02991@aitgw.ge.com>
Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 0330; Thu, 05 Sep 91 20:11:03 CDT
Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.07) with BSMTP id
 9252; Thu, 05 Sep 91 20:11:02 CDT
Date:         Thu, 5 Sep 1991 19:09:33 EDT
Reply-To: Bill Fenner <fenner%JAZZ.PSU.EDU@VM1.NoDak.EDU>
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: Bill Fenner <fenner%JAZZ.PSU.EDU@VM1.NoDak.EDU>
Subject:      Re: Noxious Formatting (was Trying to install ... )
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
 
In article <5SEP199110151520@jrvax.mis.arizona.edu> jms@arizona.edu writes:
|In article <1991Sep5.085507.33264@kuhub.cc.ukans.edu>, sloane@kuhub.cc.ukans.ed
u (Bob Sloane) writes...
|>In article <4SEP199118035309@jrvax.mis.arizona.edu>,
|> jms@jrvax.mis.arizona.edu (The Jimi Hendrix of the Accordian.) writes:
|>> PS: Noxious formatting of the header for this message courtesy of ANU V6.0.
|>
|>If you mean the X-Lunar-Date line, ANU News certainly didn't generate
|>that. It looks like whoever did forgot a newline at the end.
|
|Did too.
|
|I mean, I created X-Lunar-Date, but ANU lost the newlines.
 
He's right.  I telnet'd to my NNTP server, and typed the following:
 
]Path: jazz!fenner
]From: fenner@jazz.psu.edu (The Billster)
]Newsgroups: psu.test
]Message-ID: <goofyheadertest@jazz.psu.edu>
]X-Goofy-1: Chewy Granola, Otas and Hnoey
]NNTP-Posting-Host: zounds.dont.forge.this
]NNTP-Posting-Software: telnet ecla 119
]X-Goofy-2: This should be enough
]X-Sprained-Ankle: hurts a bit
]
]I love it when the NNTP server dumps core.
 
And here's the batch the server created:
 
]#! rnews 1
]Relay-Version: VMS News - V6.0-3 14/03/90 VAX/VMS; site ecl.psu.edu
]Path: jazz!fenner
]Newsgroups: psu.test
]Subject: Testing goofy headers
]Message-ID: <goofyheadertest@jazz.psu.edu>
]From: fenner@jazz.psu.edu (The Billster)
]Date: 5 Sep 91 18:48:35 EDT
]Nntp-Posting-Host: 128.118.55.101
]X-goofy-1: Chewy Granola, Otas and HnoeyNNTP-Posting-Host: zounds.dont.forge.th
isNNTP-Posting-Software: telnet ecla 119X-goofy-2: This should be enoughX-Sprain
ed-Ankle: hurts a bitLines: 1
]
]I love it when the NNTP server dumps core.
 
Look, ma, no carraige returns between the unknown headers!
 
The problem is the following loop in NNTP_SERVER.C, around line 1493 (if you
have my ALWAYS_SPOOL patches, earlier if you don't).
 
  for (i = 0; i < unk_index; ++i) fout_line(unk_headers[i],fpw);
 
fout_line doesn't add a carraige return, presuming that the caller will.
Try this:
 
************
File DSKJ:[WCF.NEWS.V603.NEWS_SRC]NNTP_SERVER.C;267
 1493     for (i = 0; i < unk_index; ++i) {
 1494           fout_line(unk_headers[i],fpw);
 1495           fputc('\n',fpw);
 1496     }
 1497     fprintf(fpw,"Lines: %d\n",line_count);
******
File DSKJ:[WCF.NEWS.V603.NEWS_SRC]NNTP_SERVER.C;266
 1493     for (i = 0; i < unk_index; ++i) fout_line(unk_headers[i],fpw);
 1494     fprintf(fpw,"Lines: %d\n",line_count);
************
 
Number of difference sections found: 1
Number of difference records found: 4
 
DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=DSKJ:[WCF.NEWS.V603.NEWS_SRC]UNK_HEADER.D
IFF;1-
    DSKJ:[WCF.NEWS.V603.NEWS_SRC]NNTP_SERVER.C;267-
    DSKJ:[WCF.NEWS.V603.NEWS_SRC]NNTP_SERVER.C;266
 
This should probably be considered a relatively high priority patch, if people
post using your NNTP server.
 
One other thing is that ANU-News allows the user to insert his own
NNTP-Posting-Host: header line.  The one that the NNTP server inserts will
be there to.  Hubba hubba hubba, who do ya trust?
 
I haven't decided yet on the best way to handle this, so I'll keep quiet until
I or someone else figures it out.  (Maybe make NNTP-Posting-Host a recognized
header but special-case it in the header output routine.  Same with -User.)
 
  Bill
--
Bill Fenner     fenner@jazz.psu.edu     ..psuvax1!hogbbs!wcfpc!wcf
                wcf@hogbbs.scol.pa.us   (+1 814 238-9633 2400MNP5)
