From dd41900fb6405e43af72c4956b45a6911022ae8c Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Thu, 7 Nov 2019 17:10:21 +0000 Subject: mod_authz_core: follow up to r1864759. We should at least log the unexpected provider_name == NULL condition. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1869512 13f79535-47bb-0310-9956-ffa450edef68 --- modules/aaa/mod_authz_core.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'modules/aaa') diff --git a/modules/aaa/mod_authz_core.c b/modules/aaa/mod_authz_core.c index 9c12003018..40e5fe1414 100644 --- a/modules/aaa/mod_authz_core.c +++ b/modules/aaa/mod_authz_core.c @@ -193,7 +193,6 @@ static authz_status authz_alias_check_authorization(request_rec *r, const void *parsed_require_args) { const char *provider_name; - authz_status ret = AUTHZ_DENIED; /* Look up the provider alias in the alias list. * Get the dir_config and call ap_merge_per_dir_configs() @@ -217,6 +216,7 @@ static authz_status authz_alias_check_authorization(request_rec *r, configurations and call the real provider */ if (prvdraliasrec) { ap_conf_vector_t *orig_dir_config = r->per_dir_config; + authz_status ret; r->per_dir_config = ap_merge_per_dir_configs(r->pool, orig_dir_config, @@ -227,15 +227,16 @@ static authz_status authz_alias_check_authorization(request_rec *r, prvdraliasrec->provider_parsed_args); 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); + + return ret; } } - return ret; + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02305) + "no alias provider found for '%s' (BUG?)", + provider_name ? provider_name : "n/a"); + + return AUTHZ_DENIED; } static const authz_provider authz_alias_provider = -- cgit v1.2.3