php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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 (acad.ursinus.edu:25), 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    }
7}

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.

peace
Bill Mill

Patches

Pull Requests

History

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] tal@php.net
Not a bug -- Marking as Bogus.

-Tal
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 02 12:01:29 2025 UTC