From: ("")
Date:  19 Aug 2017 23:50:58 Hong Kong Time

[PEAR-BUG] Bug #21236 [Com]: Line with starting dot is not dot stuffed

NNTP-Posting-Host:  null

Edit report at

 ID:               21236
 Comment by:       mesa57 at hotmail dot com
 Reported By:      mesa57 at hotmail dot com
 Summary:          Line with starting dot is not dot stuffed
 Status:           Analyzed
 Type:             Bug
 Package:          Net_NNTP
 Operating System: Win 7
 Package Version:  1.5.1
 PHP Version:      5.6.31
 Roadmap Versions: 
 New Comment:

We had (and some USP providers) had only problems with article body's
where dot stuffing was not done.
But I agree when reading RFC 3877 it should also be applied to headers
as wel.
Btw. does not allow to open issues.

Previous Comments:

[2017-08-19 10:58:54] heino

By the way, please use GitHub instead...


[2017-08-19 10:57:44] heino

-Status: Open
+Status: Analyzed
And this would be solved by changing the following lines in

@fwrite($this->_socket, $article);
@fwrite($this->_socket, $header);
@fwrite($this->_socket, $body);

into something line

@fwrite($this->_socket, preg_replace("|\n\.|", "\n.." , $article));
@fwrite($this->_socket, preg_replace("|\n\.|", "\n.." , $header));
@fwrite($this->_socket, preg_replace("|\n\.|", "\n.." , $body));



[2017-08-19 10:06:28] mesa57

According to
when a body is posted, an newline which starts with a dot should be
dot-stuffed (e.g. the dot should be doubled).
Net_NNTP does change the double dots at the beginning of a line when
reading the body, but does not add the extra dot when posting.


Edit this bug report at