|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #623 mail() not RFC821/822 compliant (4/4)
Submitted: 1998-08-06 01:02 UTC Modified: 1998-08-13 16:00 UTC
From: walton at nordicdms dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.2a OS: Win32
Private report: No CVE-ID: None
 [1998-08-06 01:02 UTC] walton at nordicdms dot com
Message termination dot
RFC821 4.5.2.
  Without some provision for data transparency the character
  sequence "<CRLF>.<CRLF>" ends the mail text and cannot be 
  sent by the user.  In general, users are not aware of such
  "forbidden" sequences.  To allow all user composed text to 
  be transmitted transparently the following procedures are 

    1. Before sending a line of mail text the sender-SMTP 
       checks the first character of the line.  If it is a 
       period, one additional period is inserted at the 
       beginning of the line.

    2. When a line of mail text is received by the 
       receiver-SMTP it checks the line.  If the line is 
       composed of a single period it is the end of mail.  
       If the first character is a period and there are 
       other characters on the line, the first character 
       is deleted.

SendText() in sendmail.c makes no effort to catch message lines that begin with a period.  As a result, any period 
at the beginning of the line in a message will probably 
get removed by the SMTP server, altering the message body.
Also, a message containing a single period on a line by
itself will be terminated unexpectedly.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1998-08-13 16:00 UTC] shane
see #621
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Mar 28 02:03:38 2023 UTC