authlib-0.63 fix...

Sorry if this isn't the right place for this, but I didn't see anything that
sounded closer on the sourceforge site.

So anyway, I built and installed authlib, configured it to use the MySQL
module, configured the necessary values, made the table, etc.  Started it
up, and the uid test and the uid + pw test both worked.  But the change
password test would block for a while, then fail.  I noticed a core dump,
debugged it, and noticed there was something wrong with
DEFAULT_SETPASS_UPDATE.  After a bit of additional debugging, I noticed the
#define uses defdomain unsafely here:

has_domain || !*defdomain ? "":"@",

If your usernames aren't made with @domains (which sets has_domain == 0),
and you have no default domain, it's obvious this is a problem.  So, I added
an extra sanity check in the style the developer seemed to like:

authmysqllib.c:984

                if (!defdomain)
                        defdomain="";


And that did it.  Everything i could find seemed to say the default domain
setting in the mysqlrc file was optional, as were usernames with domains in
them.

Anyway, thank you so much for this library and the work you've put into
courier as well... I am definitely a fan of the auth modules.  If I were to
add one for a different database, where would be a good place to post the
patch?

fm
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to