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

Issue 2947413002: Restrict CM API interface request and message dispatch. (Closed)

Created:
3 years, 6 months ago by engedy
Modified:
3 years, 5 months ago
CC:
gcasto+watchlist_chromium.org, vabr+watchlistpasswordmanager_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Restrict CM API interface request and message dispatch. Add safeguards to ensure that interface requests as well as RPCs are only dispatched, and thus serviced, when coming from the document corresponding to the last committed navigation in the currently active render frame. BUG=736357 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2947413002 Cr-Commit-Position: refs/heads/master@{#484608} Committed: https://chromium.googlesource.com/chromium/src/+/afef048df9416f31f2d90535c3ca946ac3f43b80

Patch Set 1 : With fix. #

Total comments: 6

Patch Set 2 : Reworked tests, added error handler in renderer. #

Total comments: 36

Patch Set 3 : Addressed comments, and used an associated interface. #

Total comments: 2

Patch Set 4 : Addressed comments from rockot@. #

Total comments: 12

Patch Set 5 : Rebase. #

Patch Set 6 : Fix missing include. #

Patch Set 7 : Address comments from vasilii@. #

Patch Set 8 : Rebase. #

Patch Set 9 : Update CredentialManagerClient browsertest to use associated interfaces. #

Total comments: 2

Patch Set 10 : Address nit from clamy@. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+417 lines, -40 lines) Patch
M chrome/browser/chrome_content_browser_client.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 3 chunks +17 lines, -2 lines 0 comments Download
M chrome/browser/password_manager/chrome_password_manager_client.h View 1 2 3 4 5 4 chunks +15 lines, -4 lines 0 comments Download
M chrome/browser/password_manager/chrome_password_manager_client.cc View 1 2 3 4 5 6 7 6 chunks +17 lines, -4 lines 0 comments Download
M chrome/browser/password_manager/chrome_password_manager_client_unittest.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/password_manager/credential_manager_browsertest.cc View 1 2 3 4 5 6 7 chunks +287 lines, -8 lines 0 comments Download
M components/password_manager/content/browser/credential_manager_impl.h View 1 2 3 chunks +5 lines, -3 lines 0 comments Download
M components/password_manager/content/browser/credential_manager_impl.cc View 1 2 2 chunks +24 lines, -3 lines 0 comments Download
M components/password_manager/content/renderer/credential_manager_client.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M components/password_manager/content/renderer/credential_manager_client.cc View 1 2 2 chunks +13 lines, -2 lines 0 comments Download
M components/password_manager/content/renderer/credential_manager_client_browsertest.cc View 1 2 3 4 5 6 7 8 5 chunks +10 lines, -10 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 3 4 5 6 7 8 9 2 chunks +12 lines, -0 lines 0 comments Download
M content/public/browser/content_browser_client.cc View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 56 (26 generated)
engedy
Daniel, Vasilii, Mike, please take a look. See the bug description for context.
3 years, 6 months ago (2017-06-23 17:08:07 UTC) #5
vasilii
Thanks for fixing this quickly! Assuming that the basic scenarios work, LGTM. 1. Log in ...
3 years, 6 months ago (2017-06-23 18:58:28 UTC) #6
dcheng
I agree that this will work, but it makes me feel like we need a ...
3 years, 6 months ago (2017-06-23 20:40:27 UTC) #7
Mike West
LGTM. As I mentioned on Friday, it might be worth adding an `origin` field to ...
3 years, 5 months ago (2017-06-26 08:43:32 UTC) #8
engedy
Hey everyone, please take a final look. I reworked tests entirely -- there is no ...
3 years, 5 months ago (2017-06-28 16:26:58 UTC) #9
engedy
One more thing: let me know if you think that any aspect of this CL ...
3 years, 5 months ago (2017-06-28 16:42:09 UTC) #10
dcheng
https://codereview.chromium.org/2947413002/diff/60001/chrome/browser/password_manager/chrome_password_manager_client.cc File chrome/browser/password_manager/chrome_password_manager_client.cc (right): https://codereview.chromium.org/2947413002/diff/60001/chrome/browser/password_manager/chrome_password_manager_client.cc#newcode463 chrome/browser/password_manager/chrome_password_manager_client.cc:463: if (!navigation_handle->IsSameDocument()) How about combining all the non-same document ...
3 years, 5 months ago (2017-06-28 19:04:50 UTC) #11
engedy
https://codereview.chromium.org/2947413002/diff/60001/components/password_manager/content/browser/credential_manager_impl.cc File components/password_manager/content/browser/credential_manager_impl.cc (right): https://codereview.chromium.org/2947413002/diff/60001/components/password_manager/content/browser/credential_manager_impl.cc#newcode58 components/password_manager/content/browser/credential_manager_impl.cc:58: binding_.Close(); On 2017/06/28 19:04:49, dcheng (OOO Jun 25 - ...
3 years, 5 months ago (2017-06-28 19:26:35 UTC) #12
dcheng
https://codereview.chromium.org/2947413002/diff/60001/components/password_manager/content/browser/credential_manager_impl.cc File components/password_manager/content/browser/credential_manager_impl.cc (right): https://codereview.chromium.org/2947413002/diff/60001/components/password_manager/content/browser/credential_manager_impl.cc#newcode58 components/password_manager/content/browser/credential_manager_impl.cc:58: binding_.Close(); On 2017/06/28 19:26:34, engedy wrote: > On 2017/06/28 ...
3 years, 5 months ago (2017-06-29 06:43:49 UTC) #13
vasilii
The solution looks good. https://codereview.chromium.org/2947413002/diff/60001/chrome/browser/password_manager/chrome_password_manager_client.cc File chrome/browser/password_manager/chrome_password_manager_client.cc (right): https://codereview.chromium.org/2947413002/diff/60001/chrome/browser/password_manager/chrome_password_manager_client.cc#newcode464 chrome/browser/password_manager/chrome_password_manager_client.cc:464: ukm_source_id_.reset(); As a side effect ...
3 years, 5 months ago (2017-06-29 12:00:00 UTC) #14
engedy
@Vasilii, @Daniel: addressed all comments, please take another look. @Ken, please a close look at ...
3 years, 5 months ago (2017-06-30 19:41:55 UTC) #15
engedy
+Ken actually. Sorry about Rietveld.
3 years, 5 months ago (2017-06-30 20:30:32 UTC) #17
Ken Rockot(use gerrit already)
LGTM with optional suggestions https://codereview.chromium.org/2947413002/diff/80001/content/public/browser/content_browser_client.h File content/public/browser/content_browser_client.h (right): https://codereview.chromium.org/2947413002/diff/80001/content/public/browser/content_browser_client.h#newcode665 content/public/browser/content_browser_client.h:665: virtual void BindAssociatedInterfaceRequestFromFrame( Please consider ...
3 years, 5 months ago (2017-06-30 21:11:24 UTC) #18
engedy
https://codereview.chromium.org/2947413002/diff/80001/content/public/browser/content_browser_client.h File content/public/browser/content_browser_client.h (right): https://codereview.chromium.org/2947413002/diff/80001/content/public/browser/content_browser_client.h#newcode665 content/public/browser/content_browser_client.h:665: virtual void BindAssociatedInterfaceRequestFromFrame( On 2017/06/30 21:11:24, Ken Rockot(use gerrit ...
3 years, 5 months ago (2017-06-30 22:27:01 UTC) #20
Ken Rockot(use gerrit already)
lgtm
3 years, 5 months ago (2017-06-30 22:33:14 UTC) #21
dcheng
https://codereview.chromium.org/2947413002/diff/100001/chrome/browser/password_manager/chrome_password_manager_client.cc File chrome/browser/password_manager/chrome_password_manager_client.cc (right): https://codereview.chromium.org/2947413002/diff/100001/chrome/browser/password_manager/chrome_password_manager_client.cc#newcode737 chrome/browser/password_manager/chrome_password_manager_client.cc:737: // zombie RFH's being swapped out following cross-origin navigations. ...
3 years, 5 months ago (2017-07-03 09:23:33 UTC) #22
engedy
https://codereview.chromium.org/2947413002/diff/100001/chrome/browser/password_manager/chrome_password_manager_client.cc File chrome/browser/password_manager/chrome_password_manager_client.cc (right): https://codereview.chromium.org/2947413002/diff/100001/chrome/browser/password_manager/chrome_password_manager_client.cc#newcode737 chrome/browser/password_manager/chrome_password_manager_client.cc:737: // zombie RFH's being swapped out following cross-origin navigations. ...
3 years, 5 months ago (2017-07-03 09:43:34 UTC) #23
vasilii
Looks good. Just couple of questions. https://codereview.chromium.org/2947413002/diff/100001/chrome/browser/password_manager/credential_manager_browsertest.cc File chrome/browser/password_manager/credential_manager_browsertest.cc (right): https://codereview.chromium.org/2947413002/diff/100001/chrome/browser/password_manager/credential_manager_browsertest.cc#newcode6 chrome/browser/password_manager/credential_manager_browsertest.cc:6: #include "base/run_loop.h" unused ...
3 years, 5 months ago (2017-07-03 13:59:47 UTC) #24
engedy
https://codereview.chromium.org/2947413002/diff/100001/chrome/browser/password_manager/credential_manager_browsertest.cc File chrome/browser/password_manager/credential_manager_browsertest.cc (right): https://codereview.chromium.org/2947413002/diff/100001/chrome/browser/password_manager/credential_manager_browsertest.cc#newcode6 chrome/browser/password_manager/credential_manager_browsertest.cc:6: #include "base/run_loop.h" On 2017/07/03 13:59:47, vasilii wrote: > unused ...
3 years, 5 months ago (2017-07-03 14:31:13 UTC) #25
vasilii
lgtm
3 years, 5 months ago (2017-07-03 15:36:23 UTC) #26
engedy
@Daniel, do you want to take a final look?
3 years, 5 months ago (2017-07-03 15:45:48 UTC) #27
dcheng
On 2017/07/03 15:45:48, engedy wrote: > @Daniel, do you want to take a final look? ...
3 years, 5 months ago (2017-07-06 01:23:16 UTC) #28
engedy
On 2017/07/06 01:23:16, dcheng wrote: > On 2017/07/03 15:45:48, engedy wrote: > > @Daniel, do ...
3 years, 5 months ago (2017-07-06 08:42:29 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2947413002/220001
3 years, 5 months ago (2017-07-06 12:26:31 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/481836)
3 years, 5 months ago (2017-07-06 12:34:09 UTC) #46
engedy
@Camille, could you please review the following for OWNER's approval: content/browser/frame_host/render_frame_host_impl.cc content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.h
3 years, 5 months ago (2017-07-06 13:19:33 UTC) #48
clamy
Thanks! Lgtm with one nit. https://codereview.chromium.org/2947413002/diff/220001/content/public/browser/content_browser_client.h File content/public/browser/content_browser_client.h (right): https://codereview.chromium.org/2947413002/diff/220001/content/public/browser/content_browser_client.h#newcode664 content/public/browser/content_browser_client.h:664: // embedder should try. ...
3 years, 5 months ago (2017-07-06 14:19:44 UTC) #49
engedy
Thanks for the quick review! https://codereview.chromium.org/2947413002/diff/220001/content/public/browser/content_browser_client.h File content/public/browser/content_browser_client.h (right): https://codereview.chromium.org/2947413002/diff/220001/content/public/browser/content_browser_client.h#newcode664 content/public/browser/content_browser_client.h:664: // embedder should try. ...
3 years, 5 months ago (2017-07-06 14:22:38 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2947413002/240001
3 years, 5 months ago (2017-07-06 14:23:06 UTC) #53
commit-bot: I haz the power
3 years, 5 months ago (2017-07-06 15:41:15 UTC) #56
Message was sent while issue was closed.
Committed patchset #10 (id:240001) as
https://chromium.googlesource.com/chromium/src/+/afef048df9416f31f2d90535c3ca...

Powered by Google App Engine
This is Rietveld 408576698