From 2b0a6ccb640e856e75217fe4d458c78d9f07bddb Mon Sep 17 00:00:00 2001 From: Justin Erenkrantz Date: Thu, 25 Apr 2002 06:16:06 +0000 Subject: [PATCH] Since UserDir is a raw argument, our config system allows it to be blank. To save us all the hassle, just flat out reject this silliness. We could treat blank as ".", but let the user shoot themselves in the foot explicitly (and don't give them any ideas on how to do it). PR: 8472 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94790 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ modules/mappers/mod_userdir.c | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGES b/CHANGES index 684d925d38..4054518ecc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.36 + *) Reject a blank UserDir directive since it is ambiguous. PR 8472. + [Justin Erenkrantz] + *) Make mod_mime use case-insensitive matching when examining extensions on all platforms. PR 8223. [Justin Erenkrantz] diff --git a/modules/mappers/mod_userdir.c b/modules/mappers/mod_userdir.c index 9a6871e812..151ac35920 100644 --- a/modules/mappers/mod_userdir.c +++ b/modules/mappers/mod_userdir.c @@ -160,6 +160,13 @@ static const char *set_user_dir(cmd_parms *cmd, void *dummy, const char *arg) char *kw = ap_getword_conf(cmd->pool, &usernames); apr_table_t *usertable; + /* Since we are a raw argument, it is possible for us to be called with + * zero arguments. So that we aren't ambiguous, flat out reject this. + */ + if (*kw == '\0') { + return "UserDir requires an argument."; + } + /* * Let's do the comparisons once. */ -- 2.40.0