You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2012/06/17 10:34:01 UTC
svn commit: r1351071 - in /httpd/httpd/trunk:
docs/log-message-tags/next-number modules/aaa/mod_authz_core.c
Author: sf
Date: Sun Jun 17 08:34:01 2012
New Revision: 1351071
URL: http://svn.apache.org/viewvc?rev=1351071&view=rev
Log:
Log error if 'Require expr' fails
Modified:
httpd/httpd/trunk/docs/log-message-tags/next-number
httpd/httpd/trunk/modules/aaa/mod_authz_core.c
Modified: httpd/httpd/trunk/docs/log-message-tags/next-number
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/log-message-tags/next-number?rev=1351071&r1=1351070&r2=1351071&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/log-message-tags/next-number (original)
+++ httpd/httpd/trunk/docs/log-message-tags/next-number Sun Jun 17 08:34:01 2012
@@ -1 +1 @@
-2320
+2321
Modified: httpd/httpd/trunk/modules/aaa/mod_authz_core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_authz_core.c?rev=1351071&r1=1351070&r2=1351071&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_authz_core.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_authz_core.c Sun Jun 17 08:34:01 2012
@@ -1045,11 +1045,18 @@ static authz_status expr_check_authoriza
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,