[imp] IMAP ACLs [PATCH]

Chris Hastie lists at oak-wood.co.uk
Tue Feb 4 20:46:08 PST 2003


On Tue, 4 Feb 2003, Didi Rieder <adrieder at sbox.tugraz.at> wrote
>Quoting Chris Hastie <lists at oak-wood.co.uk>:
>
>> If so, try adding the following shortly after line 270, where
>> $pass is defined in _getACL()
>>
>>    if (preg_match("/\W/",$pass)) {
>>        $pass = '"'.$pass.'"';
>>    }
>
>Hi Chris,
>I tried that, but it doesn't work. When I print out pass there are 4 additional
>characters (unprintable characters) attached to the actual password (string
>literals?)

That's stumped me completely. Are you saying the output of

Secret::read(Secret::getKey('imp'), $_SESSION['imp']['pass']);

is not your password? If so, I need some help from someone who knows 
more about the way passwords are stored in Horde / Imp.

I now have things working here with spaces in a password. CRAM-MD5 and 
DIGEST-MD5 seem fine anyway, whilst adding this sorts out some obvious 
things (spaces, slashes and quotes) for plain text login:

if (preg_match("/\W/",$pass)) {
     $pass = addcslashes($pass, '"\\');
     $pass = '"'.$pass.'"';
}

With this in a suitable place I can successfully retrieve ACLs on an 
account with the password set to the following line:

space "quote" and \ slash

I'll put a patch together of the various things I've learnt today.
-- 
Chris Hastie


More information about the imp mailing list