From 450f9a96dcd3ea06e6ea7dc7ddf8f6ee10acb71d Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Fri, 31 Aug 2001 22:29:28 +0000 Subject: [PATCH] Since we can preserve and further canonicalize the subreq_file name onto a canonical r->filename, let's do so. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90860 13f79535-47bb-0310-9956-ffa450edef68 --- server/request.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/request.c b/server/request.c index d44ea4d95a..9e625e2d74 100644 --- a/server/request.c +++ b/server/request.c @@ -1552,13 +1552,17 @@ AP_DECLARE(request_rec *) ap_sub_req_lookup_file(const char *new_file, 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 -- 2.40.0