You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by je...@apache.org on 2002/04/25 08:16:07 UTC

cvs commit: httpd-2.0/modules/mappers mod_userdir.c

jerenkrantz    02/04/24 23:16:06

  Modified:    .        CHANGES
               modules/mappers mod_userdir.c
  Log:
  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
  
  Revision  Changes    Path
  1.732     +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.731
  retrieving revision 1.732
  diff -u -r1.731 -r1.732
  --- CHANGES	25 Apr 2002 05:40:14 -0000	1.731
  +++ CHANGES	25 Apr 2002 06:16:06 -0000	1.732
  @@ -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]
   
  
  
  
  1.44      +7 -0      httpd-2.0/modules/mappers/mod_userdir.c
  
  Index: mod_userdir.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_userdir.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- mod_userdir.c	13 Mar 2002 20:47:51 -0000	1.43
  +++ mod_userdir.c	25 Apr 2002 06:16:06 -0000	1.44
  @@ -160,6 +160,13 @@
       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.
        */