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

Issue 212543005: Do not copy reference fragments for overridden redirects. (Closed)

Created:
6 years, 9 months ago by robwu
Modified:
6 years, 8 months ago
Reviewers:
mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Do not copy reference fragments for overridden redirects. If a network delegates sets a redirect URL (in BeforeRequest or HeadersReceived), then it should get full control over the target URL. In particular, data:-URIs should remain unchanged because Chrome does not interpret # as a delimiter for reference fragments. BUG=354653 TEST=net_unittests: URLRequestTestHTTP.RedirectWithReferenceFragment:URLRequestTestHTTP.RedirectJobWithReferenceFragment (tests new behavior) URLRequestTestHTTP.RedirectWithReferenceFragmentAndUnrelatedUnsafeUrl:URLRequestTestHTTP.Redirect302PreserveReferenceFragment (regression test) Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=261412

Patch Set 1 #

Total comments: 2

Patch Set 2 : Don't depend on allowed_unsafe_redirect_url_ #

Patch Set 3 : Add URLRequestJob::IsRedirectFragmentModificationAllowed #

Total comments: 12

Patch Set 4 : Address mmenke's comments #

Total comments: 6

Patch Set 5 : edit comments, rename method to CopyFragmentOnRedirect #

Patch Set 6 : call CopyFragmentOnRedirect (rename) #

Patch Set 7 : Removed redundant OVERRIDE #

Patch Set 8 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -37 lines) Patch
M net/base/network_delegate.h View 1 2 3 2 chunks +14 lines, -6 lines 0 comments Download
M net/url_request/url_request_http_job.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 4 5 6 7 2 chunks +14 lines, -8 lines 0 comments Download
M net/url_request/url_request_job.h View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M net/url_request/url_request_job.cc View 1 2 3 4 5 2 chunks +6 lines, -1 line 0 comments Download
M net/url_request/url_request_redirect_job.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M net/url_request/url_request_redirect_job.cc View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 4 5 6 7 5 chunks +68 lines, -22 lines 0 comments Download

Messages

Total messages: 42 (0 generated)
robwu
6 years, 9 months ago (2014-03-26 20:53:53 UTC) #1
mmenke
https://codereview.chromium.org/212543005/diff/1/net/url_request/url_request_http_job.cc File net/url_request/url_request_http_job.cc (right): https://codereview.chromium.org/212543005/diff/1/net/url_request/url_request_http_job.cc#newcode1049 net/url_request/url_request_http_job.cc:1049: !allowed_unsafe_redirect_url_.is_valid()) { This partially breaks the reason for having ...
6 years, 9 months ago (2014-03-27 14:41:46 UTC) #2
robwu
I've reverted the change, and implemented the fix as an additional SchemeIsHTTPOrHTTPS() check. Are you ...
6 years, 9 months ago (2014-03-27 18:42:25 UTC) #3
mmenke
On 2014/03/27 18:42:25, robwu wrote: > I've reverted the change, and implemented the fix as ...
6 years, 9 months ago (2014-03-27 18:49:01 UTC) #4
mmenke
On 2014/03/27 18:49:01, mmenke wrote: > On 2014/03/27 18:42:25, robwu wrote: > > I've reverted ...
6 years, 9 months ago (2014-03-27 18:49:20 UTC) #5
mmenke
On 2014/03/27 18:49:20, mmenke wrote: > On 2014/03/27 18:49:01, mmenke wrote: > > On 2014/03/27 ...
6 years, 9 months ago (2014-03-27 18:51:29 UTC) #6
robwu
On 2014/03/27 18:49:01, mmenke wrote: > On 2014/03/27 18:42:25, robwu wrote: > > I've reverted ...
6 years, 9 months ago (2014-03-27 18:54:09 UTC) #7
mmenke
On 2014/03/27 18:51:29, mmenke wrote: > On 2014/03/27 18:49:20, mmenke wrote: > > On 2014/03/27 ...
6 years, 9 months ago (2014-03-27 19:15:25 UTC) #8
robwu
I was not happy with just excluding http(s) schemes, so I changed the implementation again. ...
6 years, 9 months ago (2014-03-28 11:56:36 UTC) #9
mmenke
On 2014/03/28 11:56:36, robwu wrote: > I was not happy with just excluding http(s) schemes, ...
6 years, 8 months ago (2014-03-31 18:58:59 UTC) #10
mmenke
I think this is reasonable. More complexity than I'd like, but I don't see a ...
6 years, 8 months ago (2014-03-31 20:45:49 UTC) #11
robwu
Hi mmenke, I've edited the description and addressed your other comments. PTAL. https://codereview.chromium.org/212543005/diff/40001/net/url_request/url_request_http_job.cc File net/url_request/url_request_http_job.cc ...
6 years, 8 months ago (2014-04-01 16:09:32 UTC) #12
mmenke
LGTM! (And good job on the unit tests - nice and complete) https://codereview.chromium.org/212543005/diff/60001/net/url_request/url_request_http_job.h File net/url_request/url_request_http_job.h ...
6 years, 8 months ago (2014-04-01 20:26:50 UTC) #13
robwu
https://codereview.chromium.org/212543005/diff/60001/net/url_request/url_request_http_job.h File net/url_request/url_request_http_job.h (right): https://codereview.chromium.org/212543005/diff/60001/net/url_request/url_request_http_job.h#newcode262 net/url_request/url_request_http_job.h:262: // Reference fragment are not attached to the redirect ...
6 years, 8 months ago (2014-04-01 20:46:33 UTC) #14
robwu
The CQ bit was checked by rob@robwu.nl
6 years, 8 months ago (2014-04-01 20:47:21 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rob@robwu.nl/212543005/80001
6 years, 8 months ago (2014-04-01 20:47:43 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rob@robwu.nl/212543005/80001
6 years, 8 months ago (2014-04-01 22:51:48 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-01 23:22:30 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_chromium_compile_dbg
6 years, 8 months ago (2014-04-01 23:22:30 UTC) #19
robwu
The CQ bit was checked by rob@robwu.nl
6 years, 8 months ago (2014-04-01 23:25:51 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rob@robwu.nl/212543005/100001
6 years, 8 months ago (2014-04-01 23:27:34 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-02 00:06:11 UTC) #22
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) base_unittests, browser_tests, interactive_ui_tests, net_unittests, unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=292280
6 years, 8 months ago (2014-04-02 00:06:11 UTC) #23
robwu
The CQ bit was checked by rob@robwu.nl
6 years, 8 months ago (2014-04-02 11:50:11 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rob@robwu.nl/212543005/120001
6 years, 8 months ago (2014-04-02 11:50:30 UTC) #25
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-02 17:22:35 UTC) #26
commit-bot: I haz the power
Retried try job too often on android_aosp for step(s) compile http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_aosp&number=60397
6 years, 8 months ago (2014-04-02 17:22:36 UTC) #27
robwu
The CQ bit was checked by rob@robwu.nl
6 years, 8 months ago (2014-04-02 17:42:27 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rob@robwu.nl/212543005/120001
6 years, 8 months ago (2014-04-02 17:42:56 UTC) #29
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-03 00:52:25 UTC) #30
commit-bot: I haz the power
Retried try job too often on android_aosp for step(s) compile http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_aosp&number=60744
6 years, 8 months ago (2014-04-03 00:52:26 UTC) #31
robwu
The CQ bit was checked by rob@robwu.nl
6 years, 8 months ago (2014-04-03 08:34:31 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rob@robwu.nl/212543005/140001
6 years, 8 months ago (2014-04-03 08:35:34 UTC) #33
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-03 10:46:59 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 8 months ago (2014-04-03 10:46:59 UTC) #35
robwu
The CQ bit was checked by rob@robwu.nl
6 years, 8 months ago (2014-04-03 10:53:27 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rob@robwu.nl/212543005/140001
6 years, 8 months ago (2014-04-03 10:53:32 UTC) #37
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-03 11:03:29 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 8 months ago (2014-04-03 11:03:30 UTC) #39
robwu
The CQ bit was checked by rob@robwu.nl
6 years, 8 months ago (2014-04-03 15:21:22 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rob@robwu.nl/212543005/140001
6 years, 8 months ago (2014-04-03 15:21:31 UTC) #41
commit-bot: I haz the power
6 years, 8 months ago (2014-04-03 15:36:15 UTC) #42
Message was sent while issue was closed.
Change committed as 261412

Powered by Google App Engine
This is Rietveld 408576698