Adding case sensitivity flag to htaccess processing
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Thu, 22 Jul 2004 18:21:27 +0000 (18:21 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Thu, 22 Jul 2004 18:21:27 +0000 (18:21 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@1132 cb58f699-b61c-0410-a6fe-9272a202ed29

apache/mod_apache.cpp

index 002d845..d2f7ffc 100644 (file)
@@ -934,7 +934,7 @@ extern "C" int shib_auth_checker(request_rec* r)
                                     SHIB_AP_CHECK_IS_OK;
                                 }
                             }
-                            else if (val==w) {
+                            else if ((wrapper->getCaseSensitive() && val==w) || (!wrapper->getCaseSensitive() && !strcasecmp(val.c_str(),w))) {
                                 ap_log_rerror(APLOG_MARK,APLOG_DEBUG|APLOG_NOERRNO,SH_AP_R(r),
                                                 "shib_auth_checker() expecting %s, got %s: authorization granted", w, val.c_str());
                                 SHIB_AP_CHECK_IS_OK;
@@ -955,7 +955,7 @@ extern "C" int shib_auth_checker(request_rec* r)
                             SHIB_AP_CHECK_IS_OK;
                         }
                     }
-                    else if (val==w) {
+                    else if ((wrapper->getCaseSensitive() && val==w) || (!wrapper->getCaseSensitive() && !strcasecmp(val.c_str(),w))) {
                         ap_log_rerror(APLOG_MARK,APLOG_DEBUG|APLOG_NOERRNO,SH_AP_R(r),
                                         "shib_auth_checker() expecting %s, got %s: authorization granted", w, val.c_str());
                         SHIB_AP_CHECK_IS_OK;