httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/server request.c
Date Fri, 31 Aug 2001 22:29:28 GMT
wrowe       01/08/31 15:29:28

  Modified:    server   request.c
  Log:
    Since we can preserve and further canonicalize the subreq_file name onto
    a canonical r->filename, let's do so.
  
  Revision  Changes    Path
  1.45      +5 -1      httpd-2.0/server/request.c
  
  Index: request.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/request.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- request.c	2001/08/31 22:07:05	1.44
  +++ request.c	2001/08/31 22:29:28	1.45
  @@ -1552,13 +1552,17 @@
       fdir = ap_make_dirstr_parent(rnew->pool, r->filename);
       fdirlen = strlen(fdir);
   
  -    /* Translate r->filename
  +    /* Translate r->filename, if it was canonical, it stays canonical
        */
  +    if (r->canonical_filename != r->filename)
  +        r->canonical_filename = NULL;
       if (apr_filepath_merge(&rnew->filename, fdir, new_file,
                              APR_FILEPATH_TRUENAME, rnew->pool) != APR_SUCCESS) {
           rnew->status = HTTP_FORBIDDEN;
           return rnew;
       }
  +    if (r->canonical_filename)
  +        rnew->canonical_filename = rnew->filename;
   
       /*
        * Check for a special case... if there are no '/' characters in new_file
  
  
  

Mime
View raw message