Blame SOURCES/httpd-2.4.6-CVE-2017-9798.patch
|
|
41a6c3 |
diff --git a/server/core.c b/server/core.c
|
|
|
41a6c3 |
index f60e8fa..245fcb6 100644
|
|
|
41a6c3 |
--- a/server/core.c
|
|
|
41a6c3 |
+++ b/server/core.c
|
|
|
41a6c3 |
@@ -2061,6 +2061,12 @@ AP_CORE_DECLARE_NONSTD(const char *) ap_limit_section(cmd_parms *cmd,
|
|
|
41a6c3 |
/* method has not been registered yet, but resorce restriction
|
|
|
41a6c3 |
* is always checked before method handling, so register it.
|
|
|
41a6c3 |
*/
|
|
|
41a6c3 |
+ if (cmd->pool == cmd->temp_pool) {
|
|
|
41a6c3 |
+ /* In .htaccess, we can't globally register new methods. */
|
|
|
41a6c3 |
+ return apr_psprintf(cmd->pool, "Could not register method '%s' "
|
|
|
41a6c3 |
+ "for %s from .htaccess configuration",
|
|
|
41a6c3 |
+ method, cmd->cmd->name);
|
|
|
41a6c3 |
+ }
|
|
|
41a6c3 |
methnum = ap_method_register(cmd->pool,
|
|
|
41a6c3 |
apr_pstrdup(cmd->pool, method));
|
|
|
41a6c3 |
}
|