Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.2

Bug #21236 Line with starting dot is not dot stuffed
Submitted: 2017-08-19 14:06 UTC
From: mesa57 Assigned: heino
Status: Closed Package: Net_NNTP (version 1.5.1)
PHP Version: 5.6.31 OS: Win 7
Roadmaps: (Not assigned)    

 [2017-08-19 14:06 UTC] mesa57 (Jan Franken)
Description: ------------ 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.


 [2017-08-19 14:57 UTC] heino (Heino H. Gehlsen)
-Status: Open +Status: Analyzed
And this would be solved by changing the following lines in _sendArticle() @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 14:58 UTC] heino (Heino H. Gehlsen)
By the way, please use GitHub instead...
 [2017-08-19 15:50 UTC] mesa57 (Jan Franken)
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.
 [2017-08-19 18:12 UTC] heino (Heino H. Gehlsen)
-Assigned To: +Assigned To: heino
 [2017-08-19 18:18 UTC] heino (Heino H. Gehlsen)
Suggested changes applies do trunk. Please verify that this solves the dub, and I'll roll v1.5.2RC1...
 [2017-08-22 08:10 UTC] mesa57 (Jan Franken)
Heino, I appreciate you're fast response ! However I have ampel time to test now in preparation of my holiday end of the week. Problem is that we are using a fork of the older version under Composer. I saw that you package is still not known in packagist, so I cannot simply replace it.
 [2017-09-24 21:04 UTC] heino (Heino H. Gehlsen)
-Status: Feedback +Status: Closed