Better log message for valid-user rule failure with no session.
authorScott Cantor <cantor.2@osu.edu>
Wed, 21 Sep 2005 18:02:03 +0000 (18:02 +0000)
committerScott Cantor <cantor.2@osu.edu>
Wed, 21 Sep 2005 18:02:03 +0000 (18:02 +0000)
apache/mod_apache.cpp

index 461ec90..b780929 100644 (file)
@@ -666,9 +666,13 @@ bool htAccessControl::authorized(
             // Without some require rule, AuthType is ignored and no check_user hooks run.
             SHIB_AP_CHECK_IS_OK;
         }
-        else if (!strcmp(w,"valid-user") && entry) {
-            st->log(ShibTarget::LogLevelDebug,"htAccessControl plugin accepting valid-user based on active session");
-            SHIB_AP_CHECK_IS_OK;
+        else if (!strcmp(w,"valid-user")) {
+            if (entry) {
+                st->log(ShibTarget::LogLevelDebug,"htAccessControl plugin accepting valid-user based on active session");
+                SHIB_AP_CHECK_IS_OK;
+            }
+            else
+                st->log(ShibTarget::LogLevelError,"htAccessControl plugin rejecting access for valid-user rule, no session is active");
         }
         else if (!strcmp(w,"user") && !remote_user.empty()) {
             bool regexp=false;