summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2021-01-05 12:29:00 +0000
committerYann Ylavic <ylavic@apache.org>2021-01-05 12:29:00 +0000
commit1c575842839108a8e9e5c0055e558fde14558c0b (patch)
tree4fd17cd249aa298ab91900eb2713a94957219a7d /server
parent071375a5a176b02deaba28f42a1d8f9841d58dd2 (diff)
downloadhttpd-1c575842839108a8e9e5c0055e558fde14558c0b.tar.gz
Merge r1881311 from trunk:
Avoid a core dump at startup if "AllowOverride nonfatal" is used without any '=' after "nonfatal". Note that "nonfatal=" (without anything else) or "nonfatal=foo" are still not reported as erroneous and are silently ignored. Submitted by: jailletc36 Reviewed by: jailletc36, giovanni, ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1885144 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r--server/core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/core.c b/server/core.c
index 1acabdfbc2..79b5c29546 100644
--- a/server/core.c
+++ b/server/core.c
@@ -1801,7 +1801,10 @@ static const char *set_override(cmd_parms *cmd, void *d_, const char *l)
d->override |= OR_INDEXES;
}
else if (!strcasecmp(w, "Nonfatal")) {
- if (!strcasecmp(v, "Override")) {
+ if (!v) {
+ return apr_pstrcat(cmd->pool, "=Override, =Unknown or =All expected after ", w, NULL);
+ }
+ else if (!strcasecmp(v, "Override")) {
d->override |= NONFATAL_OVERRIDE;
}
else if (!strcasecmp(v, "Unknown")) {