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 21:03:59 GMT
wrowe       01/01/25 13:03:58

  Modified:    src      CHANGES
               src/modules/standard mod_userdir.c
  Log:
    *) Fixed translate_userdir() in MOD_USERDIR.C so that it correctly
       recognizes NetWare absolute paths.  This fixes the problem where
       MOD_USERDIR was trying to redirect to an absolute NetWare path
       rather than opening the file at the specified location.
  
  PR: 5826, 6283
  Submitted by:	Brad Nicholes <BNICHOLES@novell.com>
  
  Revision  Changes    Path
  1.1627    +6 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1626
  retrieving revision 1.1627
  diff -u -r1.1626 -r1.1627
  --- CHANGES	2001/01/25 20:44:24	1.1626
  +++ CHANGES	2001/01/25 21:03:47	1.1627
  @@ -1,5 +1,11 @@
   Changes with Apache 1.3.17
   
  +  *) Fixed translate_userdir() in MOD_USERDIR.C so that it correctly
  +     recognizes NetWare absolute paths.  This fixes the problem where
  +     MOD_USERDIR was trying to redirect to an absolute NetWare path
  +     rather than opening the file at the specified location.  This 
  +     patch fixes PR5826 & 6283. [Brad Nicholes <BNICHOLES@novell.com>]
  +
     *) Fixed ap_os_is_path_absolute() in OS.H so that it can tell the
        between a NetWare path (SYS:/path) and a URL (HTTP://path).
        [Brad Nicholes <BNICHOLES@novell.com>]
  
  
  
  1.45      +11 -0     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.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- mod_userdir.c	2001/01/15 17:05:51	1.44
  +++ mod_userdir.c	2001/01/25 21:03:55	1.45
  @@ -257,12 +257,18 @@
       while (*userdirs) {
           const char *userdir = ap_getword_conf(r->pool, &userdirs);
           char *filename = NULL;
  +#ifdef NETWARE        
  +        int is_absolute = ap_os_is_path_absolute(userdir);
  +#endif		
   
           if (strchr(userdir, '*'))
               x = ap_getword(r->pool, &userdir, '*');
   
   	if (userdir[0] == '\0' || ap_os_is_path_absolute(userdir)) {
               if (x) {
  +#ifdef NETWARE 
  +                if (strchr(x, ':') && !is_absolute )
  +#else
   #ifdef HAVE_DRIVE_LETTERS
                   /*
                    * Crummy hack. Need to figure out whether we have been
  @@ -276,6 +282,7 @@
   #else
                   if (strchr(x, ':'))
   #endif /* def HAVE_DRIVE_LETTERS */
  +#endif /* NETWARE */
   		{
                       redirect = ap_pstrcat(r->pool, x, w, userdir, dname, NULL);
                       ap_table_setn(r->headers_out, "Location", redirect);
  @@ -287,7 +294,11 @@
               else
                   filename = ap_pstrcat(r->pool, userdir, "/", w, NULL);
           }
  +#ifdef NETWARE
  +        else if (strchr(userdir, ':') && !is_absolute ) {
  +#else        
           else if (strchr(userdir, ':')) {
  +#endif
               redirect = ap_pstrcat(r->pool, userdir, "/", w, dname, NULL);
               ap_table_setn(r->headers_out, "Location", redirect);
               return REDIRECT;
  
  
  

Mime
View raw message