[dev] Bug in identitity->hasAddress()

Federico Giannici giannici@neomedia.it
Sun, 21 Jul 2002 17:22:29 +0000


Federico Giannici wrote:
> 
> It seems that the identitity->hasAddress() method works only if the
> email address is explicitly set into the identity field.
> 
> If the field is left empty (so the value is taken from
> $conf['hooks']['from']) then the substitution of the "From:" column with
> the "To: XXXX" values in the mailbox view doesn't work...

OK, OK...
Even if nobody told me anything (even a simple "it works for me" would
be appreciated...) I have found that the bug wasn't in
identitity->hasAddress() but instead in my $conf['hooks']['from']
function (returned a newline at the end of the email address, so no
match occurred).

Anyway, it seems to me that the second bug I reported three days ago is
a real one: identitity->hasAddress() compares email addresses with a
simple strpos(), so "me@domain.com" matches "notme@domain.com"!

I understand that a strict RFC822 compliance comparison is not easy to
write, but isn't the current implementation too much prone to give false
positive errors?


Bye,
___________________________________________________
    __
   |-                      giannici@neomedia.it
   |ederico Giannici      http://www.neomedia.it
___________________________________________________