[Remove entries to the current 2.0 section below, when backported]
+ *) core: Error out on sections that are missing an argument instead of
+ silently consuming the section. PR 25460.
+ [Geoffrey Young, Paul Querna]
+
*) mod_cache/mod_mem_cache/mod_disk_cache: Move out of experimental.
*) Upgraded PCRE to version 5.0. [Brian Pane]
"> directive missing closing '>'", NULL);
}
+/*
+ * Report a missing args in '<Foo >' syntax error.
+ */
+static char *missing_container_arg(cmd_parms *cmd)
+{
+ return apr_pstrcat(cmd->pool, cmd->cmd->name,
+ "> directive requires additional arguments", NULL);
+}
+
AP_CORE_DECLARE_NONSTD(const char *) ap_limit_section(cmd_parms *cmd,
void *dummy,
const char *arg)
limited_methods = apr_pstrndup(cmd->pool, arg, endp - arg);
+ if (!limited_methods[0]) {
+ return missing_container_arg(cmd);
+ }
+
while (limited_methods[0]) {
char *method = ap_getword_conf(cmd->pool, &limited_methods);
int methnum;
arg = apr_pstrndup(cmd->pool, arg, endp - arg);
+ if (!arg[0]) {
+ return missing_container_arg(cmd);
+ }
+
if (!arg) {
if (thiscmd->cmd_data)
return "<DirectoryMatch > block must specify a path";
arg = apr_pstrndup(cmd->pool, arg, endp - arg);
+ if (!arg[0]) {
+ return missing_container_arg(cmd);
+ }
+
cmd->path = ap_getword_conf(cmd->pool, &arg);
cmd->override = OR_ALL|ACCESS_CONF;
arg = apr_pstrndup(cmd->pool, arg, endp - arg);
+ if (!arg[0]) {
+ return missing_container_arg(cmd);
+ }
+
cmd->path = ap_getword_conf(cmd->pool, &arg);
/* Only if not an .htaccess file */
if (!old_path) {
arg++;
}
+ if (!arg[0]) {
+ return missing_container_arg(cmd);
+ }
+
found = ap_find_linked_module(arg);
/* search prelinked stuff */
arg++;
}
+ if (!arg[0]) {
+ return missing_container_arg(cmd);
+ }
+
defined = ap_exists_config_define(arg);
if ((!not && defined) || (not && !defined)) {
ap_directive_t *parent = NULL;
arg = apr_pstrndup(cmd->pool, arg, endp - arg);
+ if (!arg[0]) {
+ return missing_container_arg(cmd);
+ }
+
/* FIXME: There's another feature waiting to happen here -- since you
can now put multiple addresses/names on a single <VirtualHost>
you might want to use it to group common definitions and then