]> granicus.if.org Git - apache/commitdiff
Fix parsing of Require arguments in <AuthzProviderAlias>.
authorStefan Fritsch <sf@apache.org>
Mon, 9 Apr 2012 09:59:51 +0000 (09:59 +0000)
committerStefan Fritsch <sf@apache.org>
Mon, 9 Apr 2012 09:59:51 +0000 (09:59 +0000)
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
docs/log-message-tags/next-number
modules/aaa/mod_authz_core.c

diff --git a/CHANGES b/CHANGES
index 1da6ba3fcf320c3cb39c6f5f7cbb040adf6fb244..3362ff2007fb02587abf5a5b068ab8d8f52a04d0 100644 (file)
--- 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 <AuthzProviderAlias>.
+     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]
index b0812e9d3fe3ace8a0ef7282163a5a8a45a51246..1c127b0ee296bbd7681fce1c18cf3c82bf82e1d5 100644 (file)
@@ -1 +1 @@
-2305
+2306
index fb286e20a2b1f56cd161b8625c8a321439cce55c..dc116696aeda9bad6ee4e32eab17207416ecbac7 100644 (file)
@@ -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);