httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apache-1.3/src/modules/standard mod_userdir.c
Date Thu, 25 Jan 2001 22:59:37 GMT
wrowe       01/01/25 14:59:37

  Modified:    src/modules/standard mod_userdir.c
  Log:
    The netware solution is far safer, IMHO, for the OS2/Win32 code path
    as well. There is no remaining issue here for the three platforms.
    It fails if the * isn't suffixed by a slash, but that is the correct
    form in the context of security.
  
  Revision  Changes    Path
  1.48      +3 -15     apache-1.3/src/modules/standard/mod_userdir.c
  
  Index: mod_userdir.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_userdir.c,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- mod_userdir.c	2001/01/25 22:01:29	1.47
  +++ mod_userdir.c	2001/01/25 22:59:36	1.48
  @@ -266,7 +266,7 @@
       while (*userdirs) {
           const char *userdir = ap_getword_conf(r->pool, &userdirs);
           char *filename = NULL;
  -#if defined(NETWARE)
  +#if defined(NETWARE) || defined(HAVE_DRIVE_LETTERS)
           int is_absolute = ap_os_is_path_absolute(userdir);
   #endif		
   
  @@ -275,16 +275,8 @@
   
   	if (userdir[0] == '\0' || userdir[0] == '/') {
               if (x) {
  -#if defined(NETWARE)
  +#if defined(NETWARE) || defined(HAVE_DRIVE_LETTERS)
                   if (strchr(x, ':') && !is_absolute )
  -#elif defined(HAVE_DRIVE_LETTERS)
  -                /*
  -                 * Crummy hack. Need to figure out whether we have been
  -                 * redirected to a URL or to a file on some drive. Since I
  -                 * know of no protocols that are a single letter, if the : is
  -                 * the second character, I will assume a file was specified
  -                 */
  -                if ((strlen(x) > 1) && strchr(x + 2, ':'))
   #else /* !(NETWARE || HAVE_DRIVE_LETTERS) */
                   if (strchr(x, ':'))
   #endif
  @@ -299,12 +291,8 @@
               else
                   filename = ap_pstrcat(r->pool, userdir, "/", w, NULL);
           }
  -#if defined(NETWARE)
  +#if defined(NETWARE) || defined(HAVE_DRIVE_LETTERS)
           else if (strchr(userdir, ':') && !is_absolute ) {
  -#elif defined(HAVE_DRIVE_LETTERS)
  -        /* Same Crummy hack here
  -         */
  -        else if ((strlen(userdir) > 1) && strchr(userdir + 2, ':')) {
   #else /* !(NETWARE || HAVE_DRIVE_LETTERS) */
           else if (strchr(userdir, ':')) {
   #endif
  
  
  

Mime
View raw message