/[Apache-SVN]
ViewVC logotype

Revision 1812193


Jump to revision: Previous Next
Author: ylavic
Date: Sat Oct 14 16:27:14 2017 UTC (6 years, 6 months ago)
Changed paths: 8
Log Message:
Follow up to r1740928: including NOT_IN_PROXY in NOT_IN_DIR_LOC_FILE is both
incomplete and not backportable, fix it by introducing NOT_IN_DIR_CONTEXT and
restoring NOT_IN_DIR_LOC_FILE to its previous value.

Per ap_check_cmd_context(), NOT_IN_DIR_LOC_FILE actually/really means "not in
any directory context", while the definition itself does not include all the
existing directory contexts (e.g. <Limit>, or <Proxy> before r1740928).

This is a bit of a misnomer, at least, so instead of (ab)using it by adding the
missing contexts (in an incompatible way), let's define NOT_IN_DIR_CONTEXT to
really exclude all directory context (i.e. NOT_IN_DIR_LOC_FILE + NOT_IN_LIMIT +
NOT_IN_PROXY) and use it wherever NOT_IN_DIR_LOC_FILE was used.

This is by itself a major MMN bump (modules not compiled with this commit and
having directives checked against NOT_IN_DIR_LOC_FILE won't be caught the same
way by NOT_IN_DIR_CONTEXT in the new ap_check_cmd_context() code), but with the
below change, 2.4.x should work as before:

-   if ((forbidden & NOT_IN_DIR_CONTEXT) == NOT_IN_DIR_CONTEXT) {
+   if ((forbidden & NOT_IN_DIR_LOC_FILE) == NOT_IN_DIR_LOC_FILE) {
        if (cmd->path != NULL) {
            return apr_pstrcat(cmd->pool, cmd->cmd->name, gt,
-                           " cannot occur within directory context", NULL);
+                           " cannot occur within <Directory/Location/Files/Proxy> "
+                           "section", NULL);
        }
        ...
    }



Changed paths

Path Details
Directoryhttpd/httpd/trunk/include/ap_mmn.h modified , text changed
Directoryhttpd/httpd/trunk/include/http_config.h modified , text changed
Directoryhttpd/httpd/trunk/modules/generators/mod_suexec.c modified , text changed
Directoryhttpd/httpd/trunk/modules/http/http_core.c modified , text changed
Directoryhttpd/httpd/trunk/modules/mappers/mod_alias.c modified , text changed
Directoryhttpd/httpd/trunk/modules/md/mod_md_config.c modified , text changed
Directoryhttpd/httpd/trunk/modules/proxy/mod_proxy.c modified , text changed
Directoryhttpd/httpd/trunk/server/core.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26