]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Log error if 'Require expr' fails
authorStefan Fritsch <sf@apache.org>
Sun, 17 Jun 2012 08:34:01 +0000 (08:34 +0000)
committerStefan Fritsch <sf@apache.org>
Sun, 17 Jun 2012 08:34:01 +0000 (08:34 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1351071 13f79535-47bb-0310-9956-ffa450edef68

docs/log-message-tags/next-number
modules/aaa/mod_authz_core.c

index ed5edbf7f250df6988af2336a10534f55183d568..f507750d3d33f5cc92f25c4a48baae49937a2b50 100644 (file)
@@ -1 +1 @@
-2320
+2321
index a5c628e8de1ae955798390b6a12aad0a28269b3a..cf642653062565e8ac1ee93a5b7c25700d5746ba 100644 (file)
@@ -1045,11 +1045,18 @@ static authz_status expr_check_authorization(request_rec *r,
     const ap_expr_info_t *expr = parsed_require_line;
     int rc = ap_expr_exec(r, expr, &err);
 
-    if (rc <= 0)
-        /* XXX: real error handling? */
+    if (rc < 0) {
+        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02320)
+                      "Error evaluating expression in 'Require expr': %s",
+                      err);
+        return AUTHZ_GENERAL_ERROR;
+    }
+    else if (rc == 0) {
         return AUTHZ_DENIED;
-    else
+    }
+    else {
         return AUTHZ_GRANTED;
+    }
 }
 
 static const char *expr_parse_config(cmd_parms *cmd, const char *require_line,