httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44578] mod_authn_dbd option to let database validate password
Date Tue, 11 Mar 2008 16:23:31 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=44578





--- Comment #1 from Tom Donovan <Tom.Donovan@acm.org>  2008-03-11 09:23:31 PST ---
Just noticed that it is redundant to check if the first character is "T", then
check for the string "TRUE":

>+        /* any non-zero number or "T" or "TRUE" (case-insensitive) for OK */
>+        return (   *dbd_password == 't' || *dbd_password == 'T'
>+                ||  atoi(dbd_password)
>+                || !apr_strnatcasecmp(dbd_password, "TRUE") 
>+                ) ? AUTH_GRANTED : AUTH_DENIED;

would be better as:

>+        /* any non-zero number or "T" or "TRUE" (case-insensitive) for OK */
>+        return ( atoi(dbd_password)
>+                 || !apr_strnatcasecmp(dbd_password, "T") 
>+                 || !apr_strnatcasecmp(dbd_password, "TRUE") 
>+                ) ? AUTH_GRANTED : AUTH_DENIED;


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message