]> granicus.if.org Git - apache/commitdiff
prevent crash when authz provider not registered prior to use in alias
authorChris Darroch <chrisd@apache.org>
Sat, 1 Nov 2008 18:28:17 +0000 (18:28 +0000)
committerChris Darroch <chrisd@apache.org>
Sat, 1 Nov 2008 18:28:17 +0000 (18:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709746 13f79535-47bb-0310-9956-ffa450edef68

modules/aaa/mod_authz_core.c

index f61d214ab8d18de38fd35af3873716e06e9db591..a9de00a584f6b9b4668ceb970418bacec4f37b4f 100644 (file)
@@ -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);