From: Joe Orton Date: Thu, 4 Jun 2026 15:48:59 +0000 (+0000) Subject: Merge r1934981 from trunk: X-Git-Tag: 2.4.68-rc1-candidate~8 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=04641bce75a2734ad8150f9a6bc84fc5205e852b;p=thirdparty%2Fapache%2Fhttpd.git Merge r1934981 from trunk: * modules/proxy/mod_proxy_ftp.c (proxy_ftp_dir_filter): Use ap_os_escape_path() with ap_escape_html() instead of ap_escape_uri() for href attributes in generated directory listing links. Reviewed by: jorton, covener, jfclere git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1934982 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy_ftp.c b/modules/proxy/mod_proxy_ftp.c index 0e9c9b29e2..e77b91aea0 100644 --- a/modules/proxy/mod_proxy_ftp.c +++ b/modules/proxy/mod_proxy_ftp.c @@ -675,7 +675,7 @@ static apr_status_t proxy_send_dir_filter(ap_filter_t *f, *(link_ptr++) = '\0'; str = apr_psprintf(p, "%s %s %s\n", ap_escape_html(p, ctx->buffer), - ap_escape_uri(p, filename), + ap_escape_html(p, ap_os_escape_path(p, filename, 0)), ap_escape_html(p, filename), ap_escape_html(p, link_ptr)); } @@ -721,13 +721,13 @@ static apr_status_t proxy_send_dir_filter(ap_filter_t *f, if (!strcmp(filename, ".") || !strcmp(filename, "..") || ctx->buffer[0] == 'd') { str = apr_psprintf(p, "%s %s\n", ap_escape_html(p, ctx->buffer), - ap_escape_uri(p, filename), + ap_escape_html(p, ap_os_escape_path(p, filename, 0)), ap_escape_html(p, filename)); } else { str = apr_psprintf(p, "%s %s\n", ap_escape_html(p, ctx->buffer), - ap_escape_uri(p, filename), + ap_escape_html(p, ap_os_escape_path(p, filename, 0)), ap_escape_html(p, filename)); } } @@ -740,7 +740,9 @@ static apr_status_t proxy_send_dir_filter(ap_filter_t *f, filename = apr_pstrndup(p, &ctx->buffer[re_result[2].rm_so], re_result[2].rm_eo - re_result[2].rm_so); str = apr_pstrcat(p, ap_escape_html(p, apr_pstrndup(p, ctx->buffer, re_result[2].rm_so)), - "", + "", ap_escape_html(p, filename), "\n", NULL); } else {