]> granicus.if.org Git - apache/commitdiff
Since UserDir is a raw argument, our config system allows it to be blank.
authorJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 25 Apr 2002 06:16:06 +0000 (06:16 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 25 Apr 2002 06:16:06 +0000 (06:16 +0000)
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
modules/mappers/mod_userdir.c

diff --git a/CHANGES b/CHANGES
index 684d925d38bc265c8ac244aa9141f50daf534548..4054518ecc04c00257afb79e1e986ebba02fd719 100644 (file)
--- 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]
 
index 9a6871e81259014055738f9606ae4fe9963d8914..151ac35920c3be3bb2a075f2b5b5c54e50fcace0 100644 (file)
@@ -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.
      */