Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Issue 1827893002: Fix handling of escaped slashes ("%2f") in FTP paths. (Closed)

Created:
4 years, 9 months ago by mmenke
Modified:
4 years, 9 months ago
Reviewers:
eroman, jam
CC:
chromium-reviews, darin-cc_chromium.org, cbentzel+watch_chromium.org, jam, Paweł Hajdan Jr.
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix handling of escaped slashes ("%2f") in FTP paths. Chrome was unescaping them before sending requests to the server, which would map "ftp://foo/bar%2f..%2fblah" to requesting path "/bar/../blah" from the FTP server, which is weird. It now requests the file named "bar%2f..%2fblah" instead. Worth noting that GURL considers this to be a separate url from ftp://foo/blah, so its best to be consistent with that behavior. Also, when Chrome sees an FTP file with %'s in its name, it unescapes them, so Chrome would never generate a URL with "%2f" in it, but they could still come from external sources. This CL also fixes the title of directory listings of paths with "%2f" in them - ftp://foo/bar%2f/baz will now say "Index of /bar%2f/" instead of "Index of /bar//". BUG=597056 Committed: https://crrev.com/0a2a0e15f6741225fbce75cfc4fa07db0a00190d Cr-Commit-Position: refs/heads/master@{#382961}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Remove accidentally included test code #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -4 lines) Patch
M content/child/ftp_directory_listing_response_delegate.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M net/ftp/ftp_network_transaction.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M net/ftp/ftp_network_transaction_unittest.cc View 2 chunks +40 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (7 generated)
mmenke
I've tested this manually, and everything seems to be working fine. Could add more tests, ...
4 years, 9 months ago (2016-03-23 16:49:00 UTC) #2
eroman
In the CL description: "separature url" --> "separate URL" > GURL considers this to be ...
4 years, 9 months ago (2016-03-23 16:59:07 UTC) #3
mmenke
[+jam]: Need an OWNER signoff for content/child/ftp_directory_listing_response_delegate.cc. Note that change only affects the "Index of ...
4 years, 9 months ago (2016-03-23 17:05:41 UTC) #6
jam
lgtm
4 years, 9 months ago (2016-03-23 20:00:51 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1827893002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1827893002/20001
4 years, 9 months ago (2016-03-23 20:13:01 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 9 months ago (2016-03-23 23:06:57 UTC) #12
commit-bot: I haz the power
4 years, 9 months ago (2016-03-23 23:08:16 UTC) #14
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/0a2a0e15f6741225fbce75cfc4fa07db0a00190d
Cr-Commit-Position: refs/heads/master@{#382961}

Powered by Google App Engine
This is Rietveld 408576698