From: Justin Erenkrantz Date: Thu, 25 Apr 2002 06:16:06 +0000 (+0000) Subject: Since UserDir is a raw argument, our config system allows it to be blank. X-Git-Tag: 2.0.36~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c39cfec848527d9d4da31f9ba48eff1552a9afa8;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/CHANGES b/CHANGES index 684d925d38b..4054518ecc0 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 9a6871e8125..151ac35920c 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. */