|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: scarr at progbits dot com
New email:
PHP Version: OS:


 [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.


Change \n to \r\n and AUTH works fine.


Add a Patch

Pull Requests

Add a Pull Request


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

Tomas V.V.Cox
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 21 13:01:27 2024 UTC