🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
11 messages
11 total messages Started by Ivan Shmakov Sat, 15 Jun 2013 19:38
single-period (.) line amidst the BODY response?
#85575
Author: Ivan Shmakov
Date: Sat, 15 Jun 2013 19:38
39 lines
2297 bytes
	... I don't quite understand how that was possible in the first
	place, but still, is there a way for a newsreader to "recover"
	from such a situation?  (And is there a simple explanation of
	what's gone wrong?)

	Consider, e. g.:

200 news.aioe.org InterNetNews NNRP server INN 2.5.2 ready (posting ok)
MODE READER
200 news.aioe.org InterNetNews NNRP server INN 2.5.2 ready (posting ok)
GROUP sci.electronics.design
211 7476 269963 277456 sci.electronics.design
BODY 271868
222 271868 <9oKdnV-e3OnnEu_MRVn_vwA@giganews.com> body
Hi,

Am planing to design a battery charger using H bridge mosfet configuration
..

Battery spec as follows:

Battery voltage ---24V
[...]

	Note the line comprised of a single period in the middle of the
	response.

	Do I understand it correctly that by this point, the section
	3.1.1 of RFC 3977, and specifically the following paragraph,
	were completely put aside by the other party?

   3.  If any line of the data block begins with the "termination octet"
       ("." or %x2E), that line MUST be "dot-stuffed" by prepending an
       additional termination octet to that line of the block.

	TIA.

-- 
FSF associate member #7257
--
#85577
Author: Jeff-Relf.Me
Date: Sat, 15 Jun 2013 19:57
5 lines
1300 bytes
A line containing nothing but a period ('.') is OK;
e.g. <news:9oKdnV-e3OnnEu_MRVn_vwA@giganews.com>.

Instead of posting "\r\n.\r\n" ( as it is in the article ),
post "\r\n..\r\n".  Downloading is the reverse.
Re: single-period (.) line amidst the BODY response?
#85576
Author: Julien ÉLIE
Date: Sat, 15 Jun 2013 20:17
30 lines
2477 bytes
Hi Ivan,

> BODY 271868
> 222 271868 <9oKdnV-e3OnnEu_MRVn_vwA@giganews.com> body
> Hi,
>
> Am planing to design a battery charger using H bridge mosfet configuration
> .

Incidentally, I read ".." in my news reader (Thunderbird 17.0.6).  It 
seems to be a known bug:
     https://bugzilla.mozilla.org/show_bug.cgi?id=170727

I therefore removed a dot in my response.


> ... I don't quite understand how that was possible in the first
> place

Maybe the news admin has played with the article stored in raw format 
(it is possible to modify the article once stored, and remove a dot).
Or, another more likely reason would be that the configuration of the 
wireformat parameter in inn.conf has been changed from no to yes.  Yet, 
INN should be able to deal with mixed tradspool:  wire and non-wire 
format...  (It is worth trying to make sure it still works fine.)

-- 
Julien ÉLIE

« Aliud est celare, aliud tacere. »
Re: single-period (.) line amidst the BODY response?
#85578
Author: D. Stussy
Date: Sat, 15 Jun 2013 23:51
39 lines
3157 bytes
"Julien ÉLIE"  wrote in message news:kpii4q$dh9$1@news.trigofacile.com...
>...
> BODY 271868
> 222 271868 <9oKdnV-e3OnnEu_MRVn_vwA@giganews.com> body
> Hi,
>
> Am planing to design a battery charger using H bridge mosfet configuration
> .

Incidentally, I read ".." in my news reader (Thunderbird 17.0.6).  It
seems to be a known bug:
     https://bugzilla.mozilla.org/show_bug.cgi?id=170727

I therefore removed a dot in my response.


> ... I don't quite understand how that was possible in the first
> place

Maybe the news admin has played with the article stored in raw format
(it is possible to modify the article once stored, and remove a dot).
Or, another more likely reason would be that the configuration of the
wireformat parameter in inn.conf has been changed from no to yes.  Yet,
INN should be able to deal with mixed tradspool:  wire and non-wire
format...  (It is worth trying to make sure it still works fine.)
===========

This sourced from the SMTP requirement to end a message with a line 
containing a single period.  Early NNTP copied SMTP's methods.

However, this is the "on-the-wire" format.  The double-dot should have been 
converted back to a single dot for local storage purposes.  Therefore, no 
newsreader should encounter such.  To distinguish an on-the-wire double dot 
from an upconvered single dot, the rule is to add a period for any line 
consisting SOLELY of periods for wire transmission, and to strip it in local 
storage.  Someone forgot to strip it for local storage.  Some news servers 
may be using "wire" format storage while others don't.  This happened 
because some news reader encountered a "wire" format stored article. 
Re: single-period (.) line amidst the BODY response?
#85579
Author: VanguardLH
Date: Sun, 16 Jun 2013 00:58
76 lines
4669 bytes
Ivan Shmakov wrote:

> 	... I don't quite understand how that was possible in the first
> 	place, but still, is there a way for a newsreader to "recover"
> 	from such a situation?  (And is there a simple explanation of
> 	what's gone wrong?)
> 
> 	Consider, e. g.:
> 
> BODY 271868
> 222 271868 <9oKdnV-e3OnnEu_MRVn_vwA@giganews.com> body
> Hi,
> 
> Am planing to design a battery charger using H bridge mosfet configuration
> .

Doesn't matter what follows after this data delimiter line.

How does the other end know when the end of data has been reached?  By 
finding a delimiter line in the data sent to it, and that is the 
dot-newline character sequence.  

http://tools.ietf.org/html/rfc3977#page-46
See section 6.2.1.3 for examples.  
http://tools.ietf.org/html/rfc3977#page-51
See 6.2.3.3 for examples.  

The dot-newline sequence terminates the message (multi-line data 
block) but it appears you already knew that.

http://tools.ietf.org/html/rfc3977#page-56
Section 6.3.1.2
"Thus a single dot (".") on a line indicates the end of the text, and 
lines starting with a dot in the original text have that dot doubled 
during transmission."

Something has to identify to the recipient (server or client) where 
the data block ends.  The commands don't specify the data block size.  
A delimiter line does that.

I have to wonder why the NNTP server accepted anything beyond the 
dot-newline delimiter.  That should've been the end of the data block 
as far as the server was concerned.  

http://tools.ietf.org/html/rfc3977#page-8, section 3.1.1, says:

  3.  If any line of the data block begins with the "termination 
      octet" ("." or %x2E), that line MUST be "dot-stuffed" by 
      prepending an additional termination octet to that line of the 
      block.

In other words, the client should notice a dot-newline string and 
change it to dot-dot-newline before transmitting the message to the 
server; however, if the client didn't do that, the server should've 
truncated the data block at the unintentional delimiter line (and 
rejected the rest as unknown commands).

Since the owner of AIOE keeps putzing around with his proprietary set 
of rules (only a few of which he publishes at his web site) that often 
don't comply with NNTP standards, well, looks like he did something 
goofy on his end.  But does the message have what you say it does?

Google Groups copy of the single message:
https://groups.google.com/forum/?fromgroups#!original/sci.electronics.design/lu3v2ZrfEe0/v0o04A2e0G8J

There is no unintentional dot-newline delimiter line in GG's copy 
(Giganews was the injection node).  So I have to wonder why AIOE's 
copy peered to it or delivered from there is different than the GG's 
copy of the Giganews post.

Right now I don't have a telnet.exe client on my host (and it's going 
to take awhile before it gets installed) and there are way too many 
posts in that newsgroup that I don't visit to bother retrieving them 
all to see if my newsreader shows the raw message with that line (it 
shouldn't but instead figure the server sent it as the delimiter and 
end the block there).
--
#85580
Author: Jeff-Relf.Me
Date: Sun, 16 Jun 2013 01:46
23 lines
2123 bytes
Re: <news:9oKdnV-e3OnnEu_MRVn_vwA@giganews.com>

In the body, the 3rd line ends like this ( câ‹…syntax ):
"mosfet configuration\n.\r\n"

Telnet displays it like this: <<

  Am planing to design a battery charger using H bridge mosfet configuration
                                                                            .  >>
............................ monospaced ....................................^

Obviously, a spurious '\n' was inserted before the '.'.
The newsreader: "Electronics-Related.com usenet HTML frontend".

My newsreader ( Jeff-Relf.Me/X.HTM ) says "XX\n.\r\n" is two lines.

Thunderbirdâ‹…17.0.6 thinks "\n.\r\n" signals the end of the post,
NOT GOOD !

At Google Groups[*], it's 2 lines with no period ("."), NOT GOOD !
[ *: http://groups.google.com/group/sci.electronics.design/msg/6fd09e0de0344abf?dmode=source ]

Cool, my newsreader was smarter than Thunderbird and Google Groups.
Re: My newsreader was smarter than Thunderbird and Google Groups. 
#85581
Author: Russ Allbery
Date: Sun, 16 Jun 2013 01:56
19 lines
2129 bytes
Jeff-Relf.Me <@.> writes:

> Re: <news:9oKdnV-e3OnnEu_MRVn_vwA@giganews.com>

> In the body, the 3rd line ends like this ( câ‹…syntax ):
> "mosfet configuration\n.\r\n"

That would explain why the server didn't escape it.  You're only required
to escape periods preceded by \r\n.  Bare LF (unaccompanied by CR) is
technically against the article format standards, but most news servers
tolerate it, and \n.\r\n doesn't require escaping.  (That being said, news
software that isn't written exactly to the standard is likely to mishandle
that sequence.)

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: single-period (.) line amidst the BODY response?
#85582
Author: Julien ÉLIE
Date: Sun, 16 Jun 2013 09:27
25 lines
2374 bytes
Hi Dieter,

> To distinguish an
> on-the-wire double dot from an upconvered single dot, the rule is to
> add a period for any line consisting SOLELY of periods for wire
> transmission, and to strip it in local storage.

Why "SOLELY of periods"?
According to RFC 3977, Section 3.1.1:

    3.  If any line of the data block begins with the "termination octet"
        ("." or %x2E), that line MUST be "dot-stuffed" by prepending an
        additional termination octet to that line of the block.

[...]

    5.  When a multi-line block is interpreted, the "dot-stuffing" MUST
        be undone; i.e., the recipient MUST ensure that, in any line
        beginning with the termination octet followed by octets other
        than a CRLF pair, that initial termination octet is disregarded.

-- 
Julien ÉLIE

« Aliud est celare, aliud tacere. »
Re: My newsreader was smarter than Thunderbird and Google Groups. 
#85583
Author: Julien ÉLIE
Date: Sun, 16 Jun 2013 09:36
19 lines
2418 bytes
Hi Russ,

>> In the body, the 3rd line ends like this ( câ‹…syntax ):
>> "mosfet configuration\n.\r\n"
>
> That would explain why the server didn't escape it.  You're only required
> to escape periods preceded by \r\n.  Bare LF (unaccompanied by CR) is
> technically against the article format standards, but most news servers
> tolerate it, and \n.\r\n doesn't require escaping.

- innd indeed accepts the propagation of such articles.  It just logs 
"Article accepted but includes LF without CR".

- nnrpd converts bare \n to \r\n on the fly when injecting an article.

-- 
Julien ÉLIE

« Aliud est celare, aliud tacere. »
--
#85584
Author: Jeff-Relf.Me
Date: Sun, 16 Jun 2013 10:12
18 lines
1974 bytes
Suppose you're using telnet to upload and download a post ( NNTP )
or an email ( SMTP and POP, not IMAP ).

A "line" is a string of characters that end in "\r\n" ( câ‹…syntax );
by themselves, '\n' and '\r' do NOT terminate a "line",
i.e. "Hello \n World \r\n" is one line.

When uploading the body, add '.' to any lines that begin with '.'.

When downloading the body
( i.e. before you encounter the "^\.$" line [ regexâ‹…syntax ] )
remove '.' from any lines that begin with '.'.

Some plainâ‹…text attachements have linefeedâ‹…terminated lines.

So, after the download handling ( above ),
"Hello \n World \r\n" should be converted to "Hello \r\n World \r\n";
otherwise, you might get a HUGE oneâ‹…line text file.
Re: single-period (.) line amidst the BODY response?
#85585
Author: D. Stussy
Date: Sun, 16 Jun 2013 17:55
12 lines
2018 bytes
"Julien ÉLIE"  wrote in message news:kpk0dd$dk$1@news.trigofacile.com...
> To distinguish an
> on-the-wire double dot from an upconvered single dot, the rule is to
> add a period for any line consisting SOLELY of periods for wire
> transmission, and to strip it in local storage.

Why "SOLELY of periods"?
According to RFC 3977, Section 3.1.1: ...
===========
Because if the line contains any other character, it cannot be confused with 
the EOM marker and therefore doesn't need dot-stuffing. 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads