summaryrefslogtreecommitdiffstats
path: root/modules/aaa/mod_authz_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/aaa/mod_authz_core.c')
-rw-r--r--modules/aaa/mod_authz_core.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/modules/aaa/mod_authz_core.c b/modules/aaa/mod_authz_core.c
index 7ca38e7a29..73b13ab530 100644
--- a/modules/aaa/mod_authz_core.c
+++ b/modules/aaa/mod_authz_core.c
@@ -988,20 +988,22 @@ static authz_status expr_check_authorization(request_rec *r,
const char *require_line,
const void *parsed_require_line)
{
- int err = 0;
- const ap_parse_node_t *expr = parsed_require_line;
+ const char *err = NULL;
+ const ap_expr_info_t *expr = parsed_require_line;
+ int rc = ap_expr_exec(r, expr, &err);
- if (ap_expr_eval(r, expr, &err, NULL, ap_expr_string, NULL))
- return AUTHZ_GRANTED;
- else
+ if (err || !rc)
+ /* XXX: real error handling? */
return AUTHZ_DENIED;
+ else
+ return AUTHZ_GRANTED;
}
static const char *expr_parse_config(cmd_parms *cmd, const char *require_line,
const void **parsed_require_line)
{
- int expr_err = 0;
- ap_parse_node_t *expr = ap_expr_parse(cmd->pool, require_line, &expr_err);
+ const char *expr_err = NULL;
+ ap_expr_info_t *expr = ap_expr_parse_cmd(cmd, require_line, &expr_err, NULL);
if (expr_err)
return "Cannot parse expression in require line";