Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 39807 invoked by uid 500); 31 Aug 2001 22:30:50 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 39796 invoked by uid 500); 31 Aug 2001 22:30:50 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 31 Aug 2001 22:29:28 -0000 Message-ID: <20010831222928.67551.qmail@icarus.apache.org> From: wrowe@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/server request.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Status: O X-Status: X-Keywords: X-UID: 648 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