From 08146d0cf36ec7b3d3295a1801385b43d9a6dede Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Malo?= Date: Fri, 2 May 2003 21:50:55 +0000 Subject: [PATCH] Throw a warning if AllowOverride is used inside of or . Unfortunately there's no clean way to detect . It would not be sufficient, because should be checked then, too. Hmm. PR: 19512 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99695 13f79535-47bb-0310-9956-ffa450edef68 --- server/core.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/core.c b/server/core.c index 328933ddab..9999e0932d 100644 --- a/server/core.c +++ b/server/core.c @@ -1213,6 +1213,13 @@ static const char *set_override(cmd_parms *cmd, void *d_, const char *l) return err; } + /* Throw a warning if we're in or */ + if (ap_check_cmd_context(cmd, NOT_IN_LOCATION | NOT_IN_FILES)) { + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, + "Useless use of AllowOverride in line %d.", + cmd->directive->line_num); + } + d->override = OR_NONE; while (l[0]) { w = ap_getword_conf(cmd->pool, &l); -- 2.50.1