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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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.

SOLUTION:

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

Patches

Pull Requests

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: Sun Dec 22 06:01:30 2024 UTC