php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17631 SMTP Auth never returns
Submitted: 2002-06-06 14:44 UTC Modified: 2002-06-07 02:07 UTC
From: scarr at progbits dot com Assigned:
Status: Closed Package: PEAR related
PHP Version: 4.2.1 OS: WIN2k
Private report: No CVE-ID: None
 [2002-06-06 14:44 UTC] scarr at progbits dot com
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-07 02:07 UTC] cox@php.net
Fixed in CVS. Thanks Scott.


Tomas V.V.Cox
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 07:01:29 2024 UTC