INN commit: branches/2.4/frontends (mailpost.in)

INN Commit Russ_Allbery at isc.org
Fri Feb 27 18:56:16 UTC 2009


    Date: Friday, February 27, 2009 @ 10:56:16
  Author: iulius
Revision: 8360

When an article contained CRLF, parsing was broken.

Modified:
  branches/2.4/frontends/mailpost.in

-------------+
 mailpost.in |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Modified: mailpost.in
===================================================================
--- mailpost.in	2009-02-27 18:54:27 UTC (rev 8359)
+++ mailpost.in	2009-02-27 18:56:16 UTC (rev 8360)
@@ -147,7 +147,8 @@
     }
 }
 
-chomp $_;
+# Remove (CR)LF at the end of each line.
+s/\r?\n$//;
 
 my $line = undef;
 if (/^From\s+([^\s]+)\s+/) {
@@ -167,7 +168,8 @@
 
     $_ = <STDIN> ;
     last unless defined $_ ;
-    chomp ;
+    # Remove (CR)LF at the end of each line.
+    s/\r?\n$//;
 
     # Gather up a single header with possible continuation lines into $line.
     if (/^\s+/) {
@@ -428,7 +430,8 @@
   }
     for (;;) {
     $_ = <TMPFILE> ;
-    chomp ;
+    # Remove (CR)LF at the end of each line.
+    s/\r?\n$//;
     last if defined($_) && /^$/ ;
 
     if (/^Newsgroups:\s*/sio) {




More information about the inn-committers mailing list