PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Authentication » Auth » Bug #9866

Bug in Auth/Container/POP3.php

Details

Submitted2007-01-18 12:43 UTC
Fromwirtz at dfn dot de
StatusBogus
PackageAuth
PHP Version5.1.6
OSLinux (Debian etch)
Roadmaps(Not assigned)

Comments

[2007-01-18 12:43 UTC] wirtz at dfn dot de

Description:
------------
When authenticating with a POP3-Server, the servername and port from the array $options is not passed the right way.

I have fixed this with the following code (every line I chenged is marked with my email address):

--- begin of Auth/Container/POP3.php ---
...
function Auth_Container_POP3($server)
{
if(strstr($server['host'], ':')){ # wirtz@dfn.de
$serverparts = explode(':', trim($server));
$this->server = $serverparts[0];
$this->port = $serverparts[1];
}
else
{
$this->server = $server['host']; # wirtz@dfn.de
if($server->port)
{
$this->port=$server['port'];
}
else
{
$this->port="110"; # wirtz@dfn.de
}
}
}
...
--- end of Auth/Container/POP3.php ---

Test script:
---------------
see above

Expected result:
----------------
see above

Actual result:
--------------
see above

[2007-02-02 00:31 UTC] aashley at php dot net

Thank you for taking the time to write to us, but this is not
a bug.

I don't see the problem when using the package as documented. I also don't see how your code relates to what is in the last release.

the following all work as intended:

$auth = new Auth('POP3', 'hostname', 'loginFunction');

$auth = new Auth('POP3', 'hostname:port', 'loginFunction');

$auth = new Auth('POP3', array('host' => 'hostname', 'port' => 'port'), 'loginFunction);