diff options
author | Stefan Fritsch <sf@apache.org> | 2012-06-17 10:34:01 +0200 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2012-06-17 10:34:01 +0200 |
commit | d19eea86387e1dd68f97f2433555179cfb650ee1 (patch) | |
tree | 4c4f143fcb3682f6a22c4d6343db6eed3b9eb935 /modules/aaa/mod_authz_core.c | |
parent | xforms (diff) | |
download | apache2-d19eea86387e1dd68f97f2433555179cfb650ee1.tar.xz apache2-d19eea86387e1dd68f97f2433555179cfb650ee1.zip |
Log error if 'Require expr' fails
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1351071 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/aaa/mod_authz_core.c')
-rw-r--r-- | modules/aaa/mod_authz_core.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/modules/aaa/mod_authz_core.c b/modules/aaa/mod_authz_core.c index a5c628e8de..cf64265306 100644 --- a/modules/aaa/mod_authz_core.c +++ b/modules/aaa/mod_authz_core.c @@ -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, |