[tpop3d-discuss] Login Problem with 1.4.1pre2

Chris Lightfoot chris at ex-parrot.com
Fri, 8 Feb 2002 16:57:17 +0000


On Fri, Feb 08, 2002 at 06:29:22PM +0300, Odhiambo Washington wrote:
> hello list,
> 
> I seem to have run into a problem with this version.
> Initially I had some problem which I posted to the list and I
> got TWO patches which applied cleanly. I can login successfully
> using the default domain.
> However I am still not able to authenticate against mysql db.

D'oh. Another oops on my part. Patch:

diff -u -r1.40 auth_mysql.c
--- auth_mysql.c        2002/02/04 10:20:30     1.40
+++ auth_mysql.c        2002/02/08 16:55:56
@@ -574,11 +574,11 @@
 
                     if (strlen(pwhash) == 32) {
                         /* Hex. */
-                        if (strcasecmp(pwhash, md5_digest_str(pass, strlen(pass), 0)))
+                        if (strcasecmp(pwhash, md5_digest_str(pass, strlen(pass), 0)) == 0)
                             authok = 1;
                     } else if (strlen(pwhash) == 24) {
                         /* Base 64. */
-                        if (strcmp(pwhash, md5_digest_str(pass, strlen(pass), 1)))
+                        if (strcmp(pwhash, md5_digest_str(pass, strlen(pass), 1)) == 0)
                             authok = 1;
                     } else
                         /* Doesn't make sense. */


(I don't call these pre-releases for nothing!)

-- 
 I have a sure-fire idea for a hit TV show... it will
 be called `A Live Celebrity Gets Eaten By A Shark.' (Dave Barry)