https://issues.apache.org/bugzilla/show_bug.cgi?id=54463

            Bug ID: 54463
           Summary: Case sensitive option in mod_auth
           Product: Apache httpd-2
           Version: 2.4.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_auth
          Assignee: [email protected]
          Reporter: [email protected]
    Classification: Unclassified

Created attachment 29878
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29878&action=edit
Case insensitive for mod_auth

The "AuthGroupFile" and "AuthUserFile" in mod_auth use case sensitive string
comparison function, i.e., strcmp, which conflicts with the case insensitivity
of Apache's configuration design. According to my understanding, httpd
champions case insensitivity for both configuration directive and configuration
options, e.g., all boolean options and the options in the core module.

The fix is straightforward as follows:


--- modules/aaa/mod_authn_file.c        2011-12-04 16:08:01.000000000 -0800
+++ modules/aaa/mod_authn_file.c        2013-01-21 22:29:01.536197988 -0800
@@ -48,7 +48,7 @@
 static const char *set_authn_file_slot(cmd_parms *cmd, void *offset,
                                        const char *f, const char *t) 
 {
-    if (t && strcmp(t, "standard")) {
+    if (t && strcasecmp(t, "standard")) {
         return apr_pstrcat(cmd->pool, "Invalid auth file type: ", t, NULL);
     }   


--- modules/aaa/mod_authz_groupfile.c   2011-12-04 16:08:01.000000000 -0800
+++ modules/aaa/mod_authz_groupfile.c   2013-01-21 22:29:25.056198548 -0800
@@ -73,7 +73,7 @@
 static const char *set_authz_groupfile_slot(cmd_parms *cmd, void *offset,
const char *f, 
                                  const char *t) 
 {
-    if (t && strcmp(t, "standard")) {
+    if (t && strcasecmp(t, "standard")) {
         return apr_pstrcat(cmd->pool, "Invalid auth file type: ", t, NULL);
     }

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to