PEAR is archived and read-only

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

Home » Networking » Net_POP3 » Bug #4243

Problems assessing capabilities.

Details

Submitted2005-04-28 21:06 UTC
Fromrlpowell at digitalkingdom dot org
Assigneddoconnor
StatusClosed
PackageNet_POP3
PHP Version4.3.10
OSDebian Linux
Roadmaps(Not assigned)

Comments

[2005-04-28 21:06 UTC] rlpowell at digitalkingdom dot org

Description:
------------
The following is what I had to do to make net_pop3.php not crash when we inserted into TikiWiki:

Index: ./lib/webmail/net_pop3.php
===================================================================
RCS file: /cvsroot/tikiwiki/tiki/lib/webmail/Attic/net_pop3.php,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.3
diff -r1.1.2.1 -r1.1.2.3
36c36
< // $Id: net_pop3.php,v 1.1.2.1 2005/04/23 20:47:04 mose Exp $
---
> // $Id: net_pop3.php,v 1.1.2.3 2005/04/28 20:56:20 rlpowell Exp $
295c295
< $this->_capability['implementation'] = $matches[3];
---
> $this->_capability['implementation'] = $matches[1];
298c298
< $this->_capability['sasl'] = preg_split('/\s+/', $matches[3]);
---
> $this->_capability['sasl'] = preg_split('/\s+/', $matches[1]);
301c301
< $this->_capability[$capa] = $matches[2];
---
> $this->_capability[$capa] = $matches[1];
337a338,339
> $serverMethods = array();
>
339c341
< $serverMethods=$this->_capability['sasl'];
---
> $serverMethods[] = $this->_capability['sasl'][0];

[2005-05-20 09:45 UTC] pearbug20050520 at pech dot cz

This is the problem with undefined index, which has no direct connection to this bug, but should be solved with this bug. You can for example try it against dovecot.

Thanks.
Jirka Pech

--- POP3.php.orig 2005-05-20 11:42:46.317135367 +0200
+++ POP3.php 2005-05-20 11:39:51.590440164 +0200
@@ -295,7 +295,9 @@
$this->_capability['implementation'] = $matches[3];
break;
case 'sasl':
+ if (isset($matches[3])) {
$this->_capability['sasl'] = preg_split('/\s+/', $matches[3]);
+ }
break;
default :
$this->_capability[$capa] = $matches[2];

[2005-05-20 18:20 UTC] rlpowell at digitalkingdom dot org

Just for the record, dovecot is what I was using as well.

Also, I suggest adding to the if in the second patch below the following:

} else {
$this->_capability['sasl'] = $matches[1];
}