From d3752c5ab638ab87764deb84a1cbef650900cefb Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jan 28 2022 06:15:46 +0000 Subject: import squid-4.15-2.module+el8.6.0+14001+3665cb15 --- diff --git a/SOURCES/squid-4.15-ftp-filename-extraction.patch b/SOURCES/squid-4.15-ftp-filename-extraction.patch new file mode 100644 index 0000000..cf1aeb3 --- /dev/null +++ b/SOURCES/squid-4.15-ftp-filename-extraction.patch @@ -0,0 +1,32 @@ +diff --git a/src/clients/FtpGateway.cc b/src/clients/FtpGateway.cc +index da9867f..e992638 100644 +--- a/src/clients/FtpGateway.cc ++++ b/src/clients/FtpGateway.cc +@@ -1084,16 +1084,17 @@ Ftp::Gateway::checkAuth(const HttpHeader * req_hdr) + void + Ftp::Gateway::checkUrlpath() + { +- static SBuf str_type_eq("type="); +- auto t = request->url.path().rfind(';'); +- +- if (t != SBuf::npos) { +- auto filenameEnd = t-1; +- if (request->url.path().substr(++t).cmp(str_type_eq, str_type_eq.length()) == 0) { +- t += str_type_eq.length(); +- typecode = (char)xtoupper(request->url.path()[t]); +- request->url.path(request->url.path().substr(0,filenameEnd)); +- } ++ // If typecode was specified, extract it and leave just the filename in ++ // url.path. Tolerate trailing garbage or missing typecode value. Roughly: ++ // [filename] ;type=[typecode char] [trailing garbage] ++ static const SBuf middle(";type="); ++ const auto typeSpecStart = request->url.path().find(middle); ++ if (typeSpecStart != SBuf::npos) { ++ const auto fullPath = request->url.path(); ++ const auto typecodePos = typeSpecStart + middle.length(); ++ typecode = (typecodePos < fullPath.length()) ? ++ static_cast(xtoupper(fullPath[typecodePos])) : '\0'; ++ request->url.path(fullPath.substr(0, typeSpecStart)); + } + + int l = request->url.path().length(); diff --git a/SPECS/squid.spec b/SPECS/squid.spec index 20aa8ac..1c877ac 100644 --- a/SPECS/squid.spec +++ b/SPECS/squid.spec @@ -2,7 +2,7 @@ Name: squid Version: 4.15 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Squid proxy caching server Epoch: 7 # See CREDITS for breakdown of non GPLv2+ code @@ -34,6 +34,8 @@ Patch205: squid-4.11-large-acl.patch # https://bugzilla.redhat.com/show_bug.cgi?id=980511 Patch206: squid-4.11-active-ftp.patch Patch208: squid-4.11-convert-ipv4.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=2006121 +Patch209: squid-4.15-ftp-filename-extraction.patch # Security fixes @@ -95,6 +97,7 @@ lookup program (dnsserver), a program for retrieving FTP data %patch205 -p1 -b .large_acl %patch206 -p1 -b .active-ftp %patch208 -p1 -b .convert-ipv4 +%patch209 -p1 -b .ftp-fn-extraction # Security patches @@ -313,6 +316,10 @@ fi %changelog +* Tue Jan 25 2022 Luboš Uhliarik - 7:4.15-2 +- Resolves: #2006121 - SQUID shortens FTP Link wrong that contains a semi-colon + and as a result is not able to download zip file.CODE 404 TO CLIENT) + * Fri Jun 18 2021 Luboš Uhliarik - 7:4.15-1 - new version 4.15 - Resolves: #1964384 - squid:4 rebase to 4.15