Bug #17631: SMTP Auth never returns
| From: | scarr at progbits dot com | Date: | Thu, 06 Jun 2002 18:44:37 +0000 |
| Subject: | Bug #17631: SMTP Auth never returns | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-6755@lists.php.net to get a copy of this message | ||
From: scarr@progbits.com
Operating system: WIN2k
PHP version: 4.2.1
PHP Bug Type: PEAR related
Bug description: SMTP Auth never returns
Net/SMTP.php has an error in the Auth code.
If you set $params['auth'] = true; then the script never returns.
The problem exists in the following two lines:
*Line 138*
if (PEAR::isError($this->socket->write(base64_encode($uid) . "\n"))) {
return new PEAR_Error('write to socket failed'); }
*Line 141*
if (PEAR::isError($this->socket->write(base64_encode($uid) . "\n"))) {
return new PEAR_Error('write to socket failed'); }
Notice the \n instead of \r\n. This causes the SMTP server to hang waiting
for a valid line termination response.
SOLUTION:
Change \n to \r\n and AUTH works fine.
--
Edit bug report at http://bugs.php.net/?id=17631&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17631&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17631&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17631&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17631&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17631&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17631&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17631&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17631&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17631&r=globals