Bug 2006121

Summary: 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)
Product: Red Hat Enterprise Linux 8 Reporter: jfaison
Component: squidAssignee: Luboš Uhliarik <luhliari>
Status: CLOSED ERRATA QA Contact: icesalov
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.6CC: bnater, jcalhoun, kkawana
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: squid-4-8060020220125013250.d63f516d Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2044678 (view as bug list) Environment:
Last Closed: 2022-05-10 14:24:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2044678    

Description jfaison 2021-09-20 21:40:43 UTC
Description of problem:

When FTP client appends ";type=a" in the requested URL, squid chops the last character of the filename.

FTP clients == (GET ftp://ftp.example.com/test.txt;type=a ) ==> squid == (GET "test.tx") ==> FTP server.

Version-Release number of selected component (if applicable):
squid-4.11-4

How reproducible:
all the time

Steps to Reproduce:

0. Create a user on FTP server.
   Username: user
   Password: password
1. Start squid
2. Connect to squid with `telnet`.
3. Try to get "test.txt" from ftp server via squid.
4. You will see squid tries to get "test.tx" instead of "test.txt".

Actual results:
$ telnet ip
Trying ip...
Connected to ip.
Escape character is '^]'.
GET ftp://user@ip/test.txt;type=a HTTP/1.1
Authorization: Basic

HTTP/1.1 404 Not Found
Server: squid/5.1
Mime-Version: 1.0
Date: Sun, 19 Sep 2021 03:51:31 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 3972
X-Squid-Error: ERR_FTP_NOT_FOUND 0
Vary: Accept-Language
Content-Language: en
X-Cache: MISS from user.example.com
Via: 1.1 user.example.com (squid/5.1)
Connection: keep-alive

... snip ...

<p>The following URL could not be retrieved: <a href="ftp://user@ip/test.tx">ftp://user@ip/test.tx</a></p>

... snip ...

Expected results:

$ telnet ip port
Trying ip...
Connected to ip.
Escape character is '^]'.
GET ftp://user@ip/test.txt;type=a HTTP/1.1
Authorization: Basic 

HTTP/1.1 200 Gatewaying
Server: squid/5.1
Mime-Version: 1.0
Date: Sun, 19 Sep 2021 03:57:27 GMT
Content-Type: text/plain
Last-Modified: Sat, 18 Sep 2021 19:15:46 GMT
X-Cache: MISS from host.example.com
Transfer-Encoding: chunked
Via: 1.1 host.example.com (squid/5.1)
Connection: keep-alive

Additional info:

If you remove ";type=a" from the URL, squid can retrieve the file successfully.

Comment 16 errata-xmlrpc 2022-05-10 14:24:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: squid:4 security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:1939

Comment 17 Luboš Uhliarik 2022-08-30 15:09:10 UTC
*** Bug 2069470 has been marked as a duplicate of this bug. ***