|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17585 net/SMTP.php fails with dashes
Submitted: 2002-06-03 20:55 UTC Modified: 2002-06-04 02:40 UTC
From: juegajedrez at hotmail dot com Assigned:
Status: Not a bug Package: PEAR related
PHP Version: 4.2.1 OS: Windows 2000
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: juegajedrez at hotmail dot com
New email:
PHP Version: OS:


 [2002-06-03 20:55 UTC] juegajedrez at hotmail dot com
When connecting to a Microsoft Exchange Server (, pear/net/SMTP.php fails to correctly parse the server response in the ValidateAndParseResponse() function. the code segment: 

1} else {
2    $reply_code = strtok($this->lastline, '-');
3    if (strcmp($code, $reply_code)) {
4	$this->code = $reply_code;
5	return true;
6    }

is incorrect on line 3. We want this to return true (as it does above the code shown) when "if(!(strcmp($code, $reply_code)))" returns true. Without this change, The code will not parse valid responses from the server if they are followed with a dash. 
I downloaded the most recent version of php just a few days ago, and it contains this error. I tried to verify that this error still exists by using the CVS, but I could not find the net/SMTP.php file there. If it has been fixed, I apologize for the repitition.

Bill Mill


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-03 21:04 UTC] juegajedrez at hotmail dot com
Sorry about that not found on the CVS thing, I'm a moron. The file on the CVS still contains this error - Bill
 [2002-06-03 21:49 UTC] juegajedrez at hotmail dot com
My fault. Misunderstood the algorithm. more patience before a post next time :(
 [2002-06-04 02:40 UTC]
Not a bug -- Marking as Bogus.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 26 02:01:30 2024 UTC