[sork] patch: customsql option and other goodies

Jan Schneider jan at horde.org
Wed May 12 15:35:32 PDT 2004


Zitat von Kendrick Vargas <ken at hudat.com>:

> Attached is a driver called "customsql" which essentially allows the
> administrator to specify three queries for checking, setting, and
> disabling forwarding, as well as 2 column names for returning the
> keeplocal and target address values. I modified the conf.xml file to
> reflect these additions.

Committed, thanks.

> I also added configuration settings to make the password requirement and
> the keeplocal requirement optional. I did this because in my system there
> is no way to keep a local copy of email if you are forwarding to another
> address, therefore I don't want a checkbox for it. I also personally don't
> see the point of asking for the password from the user when they are
> allready logged into horde.

I only committed the keep local part of the patch for now. The password
isn't really requested for security reasons, it's only necessary for some
drivers. Thus it doesn't make much sense to me to disable it in the
configuration. I think the driver should return if it needs a password at
all. Additionally we could add a configuration setting for those drivers
that need a password to disable the password field. In these cases the
drivers would return "i don't need a password" and use the Horde password
instead.

> The templates and javascript files, as well as the logic in main.php
> reflect these paramaters as now being options. I tested this all and it
> works beautifully.

I committed only the keep local part. I also renamed the config section to
better match reality.

> There were some things I didn't quite understand. It seems that when you
> "get" the current user's forwarding settings, you use horde's password for
> the user and then md5 crypt it. How does that work if the password isn't
> plaintext?

I guess you talk about the sql driver? Not sure what that has to do with
plaintext passwords, but it's a blunt assumption that the passwords are
md5() encoded. That might be the case for Exim and most other sql backends,
but not for all, agreed.

> Also, why is the username from horde decomposed and then
> constantly recomposed in the drivers? Wouldn't it be easier to just leave
> it alone?

This has something to do with the realm support that I never really looked
into and thus never understood.

> Also, why aren't the ldap and sql drivers for exim called
> exim-sql and exim-ldap? I originally wanted to call the driver sql (makes
> the most sense) but couldn't because the name was allready taken by the
> exim specific sql entry.

Because they are Exim *based*, but should work out of the box for other
sql/ldap backends too.

> Anyways. It's like, late. I added myself as an author on the customsql
> driver, hope you don't mind :-) I also don't know how the CVS tags in the
> header will be affected, I know they're important but I don't really know
> how to set them.

They simply have to be (or at least should be) empty for new files.

Jan.

--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/


More information about the sork mailing list