Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BA28F200D01 for ; Fri, 8 Sep 2017 00:43:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B90F61609C8; Thu, 7 Sep 2017 22:43:43 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0AA161609BF for ; Fri, 8 Sep 2017 00:43:42 +0200 (CEST) Received: (qmail 18469 invoked by uid 500); 7 Sep 2017 22:43:42 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 18460 invoked by uid 99); 7 Sep 2017 22:43:42 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Sep 2017 22:43:42 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 93E4E3A00E6 for ; Thu, 7 Sep 2017 22:43:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1807655 - in /httpd/httpd/trunk: CHANGES server/core.c Date: Thu, 07 Sep 2017 22:43:41 -0000 To: cvs@httpd.apache.org From: ylavic@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170907224341.93E4E3A00E6@svn01-us-west.apache.org> archived-at: Thu, 07 Sep 2017 22:43:43 -0000 Author: ylavic Date: Thu Sep 7 22:43:41 2017 New Revision: 1807655 URL: http://svn.apache.org/viewvc?rev=1807655&view=rev Log: core: Disallow Methods' registration at run time (.htaccess), they may be used only if registered at init time (httpd.conf). Calling ap_method_register() in children processes is not the right scope since it won't be shared for all requests. Modified: httpd/httpd/trunk/CHANGES httpd/httpd/trunk/server/core.c Modified: httpd/httpd/trunk/CHANGES URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1807655&r1=1807654&r2=1807655&view=diff ============================================================================== --- httpd/httpd/trunk/CHANGES [utf-8] (original) +++ httpd/httpd/trunk/CHANGES [utf-8] Thu Sep 7 22:43:41 2017 @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) core: Disallow Methods' registration at runtime (.htaccess), they may be + used only if registered at init time (httpd.conf). [Yann Ylavic] + *) mod_md: v0.9.1: - various fixes in MDRenewWindow handling when specifying percent. Serialization changed. If someone already used percent configurations, it is advised to change these to a new value, Modified: httpd/httpd/trunk/server/core.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core.c?rev=1807655&r1=1807654&r2=1807655&view=diff ============================================================================== --- httpd/httpd/trunk/server/core.c (original) +++ httpd/httpd/trunk/server/core.c Thu Sep 7 22:43:41 2017 @@ -2331,6 +2331,12 @@ AP_CORE_DECLARE_NONSTD(const char *) ap_ /* method has not been registered yet, but resource restriction * is always checked before method handling, so register it. */ + if (cmd->pool == cmd->temp_pool) { + /* In .htaccess, we can't globally register new methods. */ + return apr_psprintf(cmd->pool, "Could not register method '%s' " + "for %s from .htaccess configuration", + method, cmd->cmd->name); + } methnum = ap_method_register(cmd->pool, apr_pstrdup(cmd->pool, method)); }