From 8486d22d82e484e2e027db30722a9b74e6c99ab9 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Fri, 14 Feb 2025 09:16:23 +0000 Subject: [PATCH] Merge r1917017, r1923218 from trunk: * server/core.c (set_override): Catch errors returned by set_allow_opts() for a parsing fail in an Options= argument. Submitted by: Zhou Qingyang Github: closes #310 Add a Changes entry related to r1917017 While at it, fix a small style issue (tab vs spaces) Submitted by: jorton, jailletc36 Reviewed by: rjung (reduce code drift), jorton, jailletc36 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1923804 13f79535-47bb-0310-9956-ffa450edef68 --- changes-entries/github 310.txt | 3 +++ server/core.c | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 changes-entries/github 310.txt diff --git a/changes-entries/github 310.txt b/changes-entries/github 310.txt new file mode 100644 index 00000000000..2d966cd488d --- /dev/null +++ b/changes-entries/github 310.txt @@ -0,0 +1,3 @@ + *) core: Report invalid Options= argument when parsing AllowOverride + directives. + Github #310 [Zhou Qingyang ] diff --git a/server/core.c b/server/core.c index a27769f3d31..cfd3c7915e6 100644 --- a/server/core.c +++ b/server/core.c @@ -1838,8 +1838,10 @@ static const char *set_override(cmd_parms *cmd, void *d_, const char *l) } else if (!ap_cstr_casecmp(k, "Options")) { d->override |= OR_OPTIONS; - if (v) - set_allow_opts(cmd, &(d->override_opts), v); + if (v) { + if ((err = set_allow_opts(cmd, &(d->override_opts), v)) != NULL) + return err; + } else d->override_opts = OPT_ALL; }