[imp] CRAM-MD5 Issue: a flow diagram, of sorts ...
Marc G. Fournier
scrappy@hub.org
Thu, 14 Feb 2002 21:12:08 -0400 (AST)
On Thu, 14 Feb 2002, Jan Schneider wrote:
> Zitat von "Marc G. Fournier" <scrappy@hub.org>:
>
> > Does this help? Can I provide any more detail that might shed further
> > light on this?
>
> It's hard to reproduce what actually happens, because the line numbers are
> shifted due to your syslog() calls.
>
> If I understood you right the 2nd call to imap_open() fails. You also said
> it uses the same username and password. So the only thing that may differ
> is the flag. Can you confirm this?
Actually, I had included all of that in my report ... in both cases, flags
was set to 64 ...
But, you do bring up something that I had overlooked ...
The first authenticate is around line 172 in imp/lib/IMP.php:
syslog(LOG_DEBUG, __FILE__.": ".__LINE__." prior to IMP::authenticate");
if (IMP::authenticate(OP_HALFOPEN) === true) {
syslog(LOG_DEBUG, __FILE__.": ".__LINE__." after IMP::authenticate");
the second one is around line 34 of imp/lib/api.php:
syslog(LOG_DEBUG , __FILE__ . ": ". __LINE__ );
if (IMP::authenticate(OP_HALFOPEN, true) === true) {
syslog(LOG_DEBUG , __FILE__ . ": ". __LINE__ );
....
Looking at authenticate itself, the default value for $setup is 'false',
which is what the 'good one' is using, while the one that fails is setting
it to true ...
*/
function authenticate($flags = 0, $setup = false)
{
if ($setup) {
$retval = IMP::setupSession();
if ($retval !== true) {
return $retval;
}
}
Does this help any?