Changes with Apache 2.3.11
+ *) core: Disallow the mixing of relative and absolute Options PR 33708.
+ [Sönke Tesch <st kino-fahrplan.de>]
+
*) core: When exporting request headers to HTTP_* environment variables,
drop variables whose names contain invalid characters. Describe in the
docs how to restore the old behaviour. [Malte S. Stretz <mss apache org>]
<code>-</code> are removed from the options currently in
force. </p>
- <note type="warning"><title>Warning</title>
+ <note><title>Note</title>
<p>Mixing <directive>Options</directive> with a <code>+</code> or
- <code>-</code> with those without is not valid syntax, and is likely
- to cause unexpected results.</p>
+ <code>-</code> with those without is not valid syntax, and will be
+ rejected during server startup by the syntax check with an abort.</p>
</note>
<p>For example, without any <code>+</code> and <code>-</code> symbols:</p>
core_dir_config *d = d_;
allow_options_t opt;
int first = 1;
+ int merge = 0;
+ int all_none = 0;
char action;
while (l[0]) {
if (*w == '+' || *w == '-') {
action = *(w++);
+ if (!merge && !first && !all_none) {
+ return "Either all Options must start with + or -, or no Option may.";
+ }
+ merge = 1;
}
else if (first) {
d->opts = OPT_NONE;
- first = 0;
+ }
+ else if (merge) {
+ return "Either all Options must start with + or -, or no Option may.";
}
if (!strcasecmp(w, "Indexes")) {
opt = OPT_MULTI|OPT_EXECCGI;
}
else if (!strcasecmp(w, "None")) {
+ if (!first) {
+ return "'Options None' must be the first Option given.";
+ }
+ else if (merge) { /* Only works since None may not follow any other option. */
+ return "You may not use 'Options +None' or 'Options -None'.";
+ }
opt = OPT_NONE;
+ all_none = 1;
}
else if (!strcasecmp(w, "All")) {
+ if (!first) {
+ return "'Options All' must be the first option given.";
+ }
+ else if (merge) { /* Only works since All may not follow any other option. */
+ return "You may not use 'Options +All' or 'Options -All'.";
+ }
opt = OPT_ALL;
+ all_none = 1;
}
else {
return apr_pstrcat(cmd->pool, "Illegal option ", w, NULL);
else {
d->opts |= opt;
}
+
+ first = 0;
}
return NULL;