Net_SMTP 1.1.0 SIZE bug
| From: | Bruno Pedro | Date: | Thu, 30 Jan 2003 11:13:45 +0000 |
| Subject: | Net_SMTP 1.1.0 SIZE bug | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-12841@lists.php.net to get a copy of this message | ||
Hi!
I think I found a bug in Net_SMTP 1.1.0. It's related with the new added
feature 'The SMTP server's SIZE capability is now honored'.
The bug happens when the server issues a SIZE response equal to zero.
The message size is always greater than the allowed size preventing you
from sending any message.
RFC 1870, section 3, subsection 3, tells that 'a value of zero indicates
that no fixed maximum message size is in force'. Furthermore, it says
that if 'the parameter is omitted no information is conveyed about the
server's fixed maximum message size'.
This is not what happens in 'Net/SMTP.php', line 654 where only the
second statement is verified. I send an attached patch that should fix
this problem.
Regards
--
Bruno Pedro
PTM.com
Get my public key here:
http://search.keyserver.net:11371/pks/lookup?op=get&search=0x9FEECDC8
654c654 < if (isset($this->_esmtp['SIZE'])) { --- > if (isset($this->_esmtp['SIZE']) && ($this->_esmtp['SIZE'] > 0)) { Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
654c654 < if (isset($this->_esmtp['SIZE'])) { --- > if (isset($this->_esmtp['SIZE']) && ($this->_esmtp['SIZE'] > 0)) { Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc