Handle bare codes (an RFC contravention) in SMTP replies, fixes #1017
This commit is contained in:
parent
7115df4a6f
commit
6525e86940
|
|
@ -1,5 +1,7 @@
|
|||
# ChangeLog
|
||||
|
||||
* Handle bare codes (an RFC contravention) in SMTP server responses
|
||||
|
||||
## Version 5.2.23 (March 15th 2017)
|
||||
* Improve trapping of TLS errors during connection so that they don't cause warnings, and are reported better in debug output
|
||||
* Amend test suite so it uses PHPUnit version 4.8, compatible with older versions of PHP, instead of teh version supplied by Travis-CI
|
||||
|
|
|
|||
|
|
@ -1089,8 +1089,10 @@ class SMTP
|
|||
$this->edebug("SMTP -> get_lines(): \$data is \"$data\"", self::DEBUG_LOWLEVEL);
|
||||
$this->edebug("SMTP -> get_lines(): \$str is \"$str\"", self::DEBUG_LOWLEVEL);
|
||||
$data .= $str;
|
||||
// If 4th character is a space, we are done reading, break the loop, micro-optimisation over strlen
|
||||
if ((isset($str[3]) and $str[3] == ' ')) {
|
||||
// If response is only 3 chars (not valid, but RFC5321 S4.2 says it must be handled),
|
||||
// or 4th character is a space, we are done reading, break the loop,
|
||||
// string array access is a micro-optimisation over strlen
|
||||
if (!isset($str[3]) or (isset($str[3]) and $str[3] == ' ')) {
|
||||
break;
|
||||
}
|
||||
// Timed-out? Log and break
|
||||
|
|
|
|||
Loading…
Reference in New Issue