From 6bfd10b3d91ded49055a408adb2b6ab2c35874b3 Mon Sep 17 00:00:00 2001 From: Chris Darroch Date: Sat, 1 Nov 2008 18:28:17 +0000 Subject: [PATCH] prevent crash when authz provider not registered prior to use in alias git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709746 13f79535-47bb-0310-9956-ffa450edef68 --- modules/aaa/mod_authz_core.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/aaa/mod_authz_core.c b/modules/aaa/mod_authz_core.c index f61d214ab8..a9de00a584 100644 --- a/modules/aaa/mod_authz_core.c +++ b/modules/aaa/mod_authz_core.c @@ -274,6 +274,14 @@ static const char *authz_require_alias_section(cmd_parms *cmd, void *mconfig, ap_lookup_provider(AUTHZ_PROVIDER_GROUP, provider_name, AUTHZ_PROVIDER_VERSION); + /* by the time the config file is used, the provider should be loaded + * and registered with us. + */ + if (!prvdraliasrec->provider) { + return apr_psprintf(cmd->pool, + "Unknown Authz provider: %s", + provider_name); + } authcfg = ap_get_module_config(cmd->server->module_config, &authz_core_module); -- 2.40.0