[imp] Major Bug Causes All Prefs to be Erased!

Lee lee at disinfo.com
Sat Oct 18 16:26:16 PDT 2003


We're using the latest release versions of
horde/imp/turba with an ldap (openldap) prefs backend,
and found a pretty severe bug. If the ldap server
containing the prefs for the users is down (even for a
breif second) and a user logs into horde/imp during
this time, then during the user's session the ldap
prefs server comes back online, all of the users prefs
including identities, filters and prefs are erased!

Sorting through the code as best as possible (im not
an expert here) it seems like whats happening is that
horde/imp are filling the user's session preferences
with Defaults (blank) values when teh users logs in
bcause horde/imp can't access the ldap server
containing the prefs. Then since the user is logged in
when the ldap server comes back online, horde/imp
writes the blank/default prefs values to the ldap
server thinking that these are the newest values.

Anyway, I tried to make a patch to fix this, but im
having a tremendous amount of trouble. Basically i
think one of two things needs to happen to solve this
problem:

1) A session variable needs to be set marking prefs
are non-writable so that when horde/imp sets default
values for the users preferences when teh ldap server
is unavailable, horde/imp will know not to write these
values anytime during the session.

or

2) (not as clean) Have horde/imp prevent a user from
logging in if the ldap preferences server is
unavailable. Likewise if the ldap server becomes
unavailable, immediately log the user out instead of
setting default prefs values.

Anyway, this bug is pretty bad, as it causes compelte
data loss. Has anyone else run into this? Is there
someone that is an expert with horde/imp code that
might be able to come up with (or help me) come up
with a patch to fix this?

Thanks,
Lee


More information about the imp mailing list