Commit 8352c7d4 authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  Canonicalization will now occur on all sub_req_lookup_file() calls,
  and the ap_server_root_relative() will handle canonicalization as well.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90566 13f79535-47bb-0310-9956-ffa450edef68
parent deda92f3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -104,7 +104,6 @@ static const char *dav_fs_cmd_davlockdb(cmd_parms *cmd, void *config,

    conf = ap_get_module_config(cmd->server->module_config,
                                &dav_fs_module);
    arg1 = ap_os_canonical_filename(cmd->pool, arg1);
    conf->lockdb_path = ap_server_root_relative(cmd->pool, arg1);

    return NULL;
+3 −6
Original line number Diff line number Diff line
@@ -777,12 +777,9 @@ static int dav_method_get(request_rec *r)
	    return HTTP_NOT_FOUND;
	}

	/* Convert to canonical filename, so Apache detects component
	 * separators (on Windows, it only looks for '/', not '\')
	/* Create a sub-request with the new filename 
         * The new_req filename is canonicalized by ap_sub_req_lookup_file()
         */
	pathname = ap_os_case_canonical_filename(r->pool, pathname);

	/* Create a sub-request with the new filename */
	new_req = ap_sub_req_lookup_file(pathname, r, NULL);
	if (new_req == NULL) {
	    (*resource->hooks->free_file)(fhandle);