New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 738876 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Buried. Ping if important.
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

FTP login by URL broken

Reported by i...@lyl-canbys.de, Jul 3 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

Example URL:
ftp://test:tE5T!12345@labs.gwendragon.de/a.mkv

Steps to reproduce the problem:
1. Paste URL in address field
2. Hit Enter
3. Authentication popup appears

What is the expected behavior?
File should be opened/downloaded without any need for extra login data

What went wrong?
Authentication popup for username and password appears

Did this work before? N/A 

Chrome version: 59.0.3071.115  Channel: stable
OS Version: 10.0
Flash Version:
 
Cc: sandeepkumars@chromium.org
Labels: M-61 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Tested this issue using #59.0.3071.115 on Win 10, Mac 10.12.5 and Linux Ubuntu 14.04 and was able to reproduce the issue.

Note:
1. This issue seems to be a Non-Regression issue as same behavior is seen since M45. Hence untriaged the issue to get more inputs from Dev.
2. This issue seems to be a site specific issue as same behavior is seen in Fire fox too
3. Issue is seen in latest M61 as well.

Please refer the screenshot.

Thanks!!
Screen Shot 2017-07-05 at 11.57.51 AM.png
249 KB View Download

Comment 2 by i...@lyl-canbys.de, Jul 5 2017

Download an login works without problems with:
Internet Explorer 11
Opera 12
and
wget 'ftp://test:tE5T!12345@labs.gwendragon.de/a.mkv'
curl 'ftp://test:tE5T!12345@labs.gwendragon.de/a.mkv' -o a.mkv
w3m 'ftp://test:tE5T!12345@labs.gwendragon.de/a.mkv' 


Comment 3 by i...@lyl-canbys.de, Jul 5 2017

Works with 
winscp ftp://test:tE5T!12345@labs.gwendragon.de/a.mkv

Comment 4 by i...@lyl-canbys.de, Jul 5 2017

Opens without problems on these:
Windows 10 x64
vlc.exe ftp://test:tE5T!12345@labs.gwendragon.de/a.mkv
ffprobe.exe ftp://test:tE5T!12345@labs.gwendragon.de/a.mkv
ffplay.exe ftp://test:tE5T!12345@labs.gwendragon.de/a.mkv

Debian 8.8 x64
Konqueror 4.14.2 
Firefox 52.2

Components: -Internals>Network Internals>Media>Network Internals>Network>FTP
Hrm...We're correctly using the entered credentials, and getting the response body.  If you go to other files on the site, it works fine (Like ftp://test:tE5T!12345@labs.gwendragon.de/a.html).  So I think this is media playback + ftp URL with credentials in it.

We issue a request, get the media mime type and response body, pass that to the media code, and then the media code issues another request without credentials.

Media guys:  You have any idea what happens to the credentials here?
(And yes, I have verified the network stack sees two requests from the renderer, one with the credentials, and one without.  We prompt for credentials in response to the credential-less URL)
Owner: hubbe@chromium.org
Status: Assigned (was: Untriaged)
Hmm, I guess I didn't think ftp + video was a supported thing, but I see that other browsers support it.

Comment 8 by hubbe@chromium.org, Jul 10 2017

I thought these kind of credentials were handled similarly to cookies.
By the time the media code gets the URL, the username/PW has been stripped off, or we would just send it back as is. My assumption is that the credentials gets associated with the WebFrame, but I don't know why they don't get added on to the request when we make it...

Comment 9 by mmenke@chromium.org, Jul 10 2017

When credentials are entered by the user, the network stack tracks and adds them to requests as needed.  When they come from a URL, however, we don't.
Cc: mkwst@chromium.org
I consider this a pretty low priority feature (We don't even support FTP for subresources anymore), so may just be a WontFix.

[+mkwst] who removed FTP for subresources, and may have thoughts on using FTP for anything other than downloads / directory listings.
Labels: -Pri-2 Pri-3
Testing with other browsers, IE doesn't do anything.  FireFox downloads it to a file, rather than playing it.  FireFox still renders the HTML file, though, so can't just disable MIME sniffing for FTP entirely, unfortunately (Well, without breaking compat, at least).

Comment 14 by mkwst@chromium.org, Jul 11 2017

I've been working on the assumption that we'd eventually like to move FTP support out of Chrome, into some sort of helper. We're also looking skeptically at embedded username/passwords, which we're now blocking for subresource loads, and have been thinking about blocking for top-level navigations as well (the numbers are super low, but the folks who use the feature are vocal, so, it's tough to measure the actual impact).

I suspect that this is both related to the code hubbe@ pointed to, and to our implementation of the media playing widget, which basically rewrites the MKV file into an HTML page that contains a `<video>` element which embeds the MKV file. It acts as a subresource, so it's affected by the subresource-blocking code mmenke@ mentioned above.

I'd suggest that this is WAI, with the caveat that I'd be even happier if we just downloaded resources from FTP sites rather than rendering them as webby resources. Given the numbers for Navigation.MainFrameScheme and Navigation.MainFrameSchemeDifferentPage, FTP navigation is very uncommon (0.0013% of the former, 0.0028% of the latter over the last 28 days).

Comment 15 by hubbe@chromium.org, Jul 14 2017

Status: WontFix (was: Assigned)
This is not intended to work, and as such, I'm not going to fix it.

Comment 16 by hubbe@chromium.org, Jul 14 2017

Status: Available (was: WontFix)
Actually, no we should probably just make the file download, but how?

Comment 17 by hubbe@chromium.org, Jul 14 2017

Cc: -mkwst@chromium.org hubbe@chromium.org
Owner: mkwst@chromium.org
Handing off to mkwest@ feel free to delegate further... :)

Cc: asanka@chromium.org
We could either non-mime sniff FTP files, or only mime sniff them text/* or image/* formats (And if there are any other mime types we don't load as a subresource when they're navigated to, includes those as well).  We currently don't have any scheme-specific mime sniffing logic, so that solution seems kinda funky.
Project Member

Comment 19 by sheriffbot@chromium.org, Jul 16

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Assigned (was: Untriaged)

Sign in to add a comment