From a00f9b1a59eff2968478d998dcdaaa16b2c14a9e Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Mon, 9 Apr 2012 09:59:51 +0000 Subject: [PATCH] Fix parsing of Require arguments in . Add some logging and an assert for a case that should not happen. PR: 53048 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1311183 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ docs/log-message-tags/next-number | 2 +- modules/aaa/mod_authz_core.c | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 1da6ba3fcf..3362ff2007 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_authz_core: Fix parsing of Require arguments in . + PR 53048. [Stefan Fritsch] + *) core: Fix error handling in ap_scan_script_header_err_brigade() if there is no EOS bucket in the brigade. Fixes segfault with mod_proxy_fcgi. PR 48272. [Stefan Fritsch] diff --git a/docs/log-message-tags/next-number b/docs/log-message-tags/next-number index b0812e9d3f..1c127b0ee2 100644 --- a/docs/log-message-tags/next-number +++ b/docs/log-message-tags/next-number @@ -1 +1 @@ -2305 +2306 diff --git a/modules/aaa/mod_authz_core.c b/modules/aaa/mod_authz_core.c index fb286e20a2..dc116696ae 100644 --- a/modules/aaa/mod_authz_core.c +++ b/modules/aaa/mod_authz_core.c @@ -221,6 +221,14 @@ static authz_status authz_alias_check_authorization(request_rec *r, r->per_dir_config = orig_dir_config; } + else { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02305) + "no alias provider found for '%s' (BUG?)", + provider_name); + } + } + else { + ap_assert(provider_name != NULL); } return ret; @@ -305,6 +313,14 @@ static const char *authz_require_alias_section(cmd_parms *cmd, void *mconfig, "Unknown Authz provider: %s", provider_name); } + if (prvdraliasrec->provider->parse_require_line) { + const char *err = prvdraliasrec->provider->parse_require_line(cmd, + provider_args, &prvdraliasrec->provider_parsed_args); + if (err) + return apr_psprintf(cmd->pool, + "Can't parse 'Require %s %s': %s", + provider_name, provider_args, err); + } authcfg = ap_get_module_config(cmd->server->module_config, &authz_core_module); -- 2.40.0