]> granicus.if.org Git - apache/commitdiff
Merge r1311183 from trunk:
authorJim Jagielski <jim@apache.org>
Tue, 10 Jul 2012 14:14:11 +0000 (14:14 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 10 Jul 2012 14:14:11 +0000 (14:14 +0000)
Fix parsing of Require arguments in <AuthzProviderAlias>.
Add some logging and an assert for a case that should not happen.

PR: 53048

Submitted by: sf
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1359691 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/aaa/mod_authz_core.c

diff --git a/CHANGES b/CHANGES
index 718471340c7e5fbdde7d6ebae9f858d359c34199..7ac818f790462577002423ef506c644772fe1d9c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,9 @@ Changes with Apache 2.4.3
      possible XSS for a site where untrusted users can upload files to
      a location with MultiViews enabled. [Niels Heinen <heinenn google.com>]
 
+  *) mod_authz_core: Fix parsing of Require arguments in <AuthzProviderAlias>.
+     PR 53048. [Stefan Fritsch]
+
   *) mod_log_config: Fix %{abc}C truncating cookie values at first "=".
      PR 53104. [Greg Ames]
 
diff --git a/STATUS b/STATUS
index bd5acd3e375536269bf71495505d8878728da6a6..58629a06eff018018d3485628948719abe92e7ad 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -88,12 +88,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * mod_authz_core: Fix parsing of Require arguments in <AuthzProviderAlias>.
-    Add some logging and an assert for a case that should not happen.
-    PR: 53048
-    Trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1311183
-    2.4 patch: Trunk patch works
-    +1: sf, covener, jim
 
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
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);