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

Issue 2392763002: Sanitize unparcable intents (Closed)

Created:
4 years, 2 months ago by kraush
Modified:
4 years, 1 month ago
Reviewers:
Ted C, Maria
CC:
chromium-reviews, agrieve+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Sanitize unparcable intents ChromeLauncherActivity did not have sanitation of incoming intents, and thus if for example an intent with a bad Parcel was sent, Chrome crashed. This change strips away all extras and makes sure Chrome properly opens the intended website instead. BUG=652460, 412527 Committed: https://crrev.com/4bca3b37801c502a164536b804879c00aba7d304 Cr-Commit-Position: refs/heads/master@{#427697}

Patch Set 1 #

Total comments: 10

Patch Set 2 : Addressed Ted's comments #

Patch Set 3 : Reverted one more change that was made obsolete by diff 2 #

Total comments: 7

Patch Set 4 : Log exception, use repalceExtras and some refactors for testing #

Total comments: 1

Patch Set 5 : Instrumentation tests and functional revert in LauncherActivity #

Total comments: 6

Patch Set 6 : Removed unit test and expanded instrumentation test #

Patch Set 7 : Fixed merge conflict #

Patch Set 8 : Fix lint and findbugs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -5 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java View 1 2 3 4 5 6 2 chunks +17 lines, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/document/LauncherActivityTest.java View 1 2 3 4 5 6 7 4 chunks +71 lines, -3 lines 0 comments Download

Messages

Total messages: 47 (12 generated)
kraush
Hi Ted, Can you take a look at this change to guard Chrome against intents ...
4 years, 2 months ago (2016-10-03 23:02:35 UTC) #2
Ted C
overall this seems like a good change to me. but Maria is our resident intent ...
4 years, 2 months ago (2016-10-04 20:19:23 UTC) #4
kraush
https://codereview.chromium.org/2392763002/diff/1/chrome/android/BUILD.gn File chrome/android/BUILD.gn (right): https://codereview.chromium.org/2392763002/diff/1/chrome/android/BUILD.gn#newcode335 chrome/android/BUILD.gn:335: "//third_party/android_tools:android_support_v7_appcompat_java", On 2016/10/04 20:19:23, Ted C wrote: > why ...
4 years, 2 months ago (2016-10-04 21:36:36 UTC) #5
kraush
Addressed Ted's comments. This also reduced the number of files changed from 9 to 4, ...
4 years, 2 months ago (2016-10-04 21:58:34 UTC) #6
Maria
https://codereview.chromium.org/2392763002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java File chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java (right): https://codereview.chromium.org/2392763002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java#newcode352 chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java:352: Log.e(TAG, "Invalid incoming intent."); add e at the third ...
4 years, 2 months ago (2016-10-06 18:16:42 UTC) #8
kraush
https://codereview.chromium.org/2392763002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java File chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java (right): https://codereview.chromium.org/2392763002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java#newcode352 chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java:352: Log.e(TAG, "Invalid incoming intent."); On 2016/10/06 18:16:41, Maria wrote: ...
4 years, 2 months ago (2016-10-06 18:44:04 UTC) #9
Maria
https://codereview.chromium.org/2392763002/diff/40001/chrome/android/junit/src/org/chromium/chrome/browser/document/ChromeLauncherActivityTest.java File chrome/android/junit/src/org/chromium/chrome/browser/document/ChromeLauncherActivityTest.java (right): https://codereview.chromium.org/2392763002/diff/40001/chrome/android/junit/src/org/chromium/chrome/browser/document/ChromeLauncherActivityTest.java#newcode35 chrome/android/junit/src/org/chromium/chrome/browser/document/ChromeLauncherActivityTest.java:35: public class ChromeLauncherActivityTest { On 2016/10/06 18:44:04, kraush wrote: ...
4 years, 2 months ago (2016-10-10 23:25:53 UTC) #10
kraush
On 2016/10/10 23:25:53, Maria wrote: > > I have one idea, but not sure whether ...
4 years, 2 months ago (2016-10-10 23:39:50 UTC) #11
Maria
On 2016/10/10 23:39:50, kraush wrote: > On 2016/10/10 23:25:53, Maria wrote: > > > > ...
4 years, 2 months ago (2016-10-11 04:03:55 UTC) #12
kraush
On 2016/10/11 04:03:55, Maria wrote: > On 2016/10/10 23:39:50, kraush wrote: > > On 2016/10/10 ...
4 years, 2 months ago (2016-10-11 23:25:37 UTC) #13
kraush
I tried the following things: - Specifically loading a class with a custom class loader, ...
4 years, 2 months ago (2016-10-12 17:52:55 UTC) #14
Maria
On 2016/10/12 17:52:55, kraush wrote: > I tried the following things: > > - Specifically ...
4 years, 2 months ago (2016-10-12 18:03:47 UTC) #15
Maria
On 2016/10/12 18:03:47, Maria wrote: > On 2016/10/12 17:52:55, kraush wrote: > > I tried ...
4 years, 2 months ago (2016-10-12 18:59:43 UTC) #16
kraush
Hi Maria, I've addressed your comments. I had two do a few additional changes to ...
4 years, 2 months ago (2016-10-12 19:47:07 UTC) #17
Maria
https://codereview.chromium.org/2392763002/diff/60001/chrome/android/junit/src/org/chromium/chrome/browser/document/ChromeLauncherActivityTest.java File chrome/android/junit/src/org/chromium/chrome/browser/document/ChromeLauncherActivityTest.java (right): https://codereview.chromium.org/2392763002/diff/60001/chrome/android/junit/src/org/chromium/chrome/browser/document/ChromeLauncherActivityTest.java#newcode80 chrome/android/junit/src/org/chromium/chrome/browser/document/ChromeLauncherActivityTest.java:80: final Intent badIntent = mock(Intent.class, new BadParcelableExceptionAnswer()); I am ...
4 years, 2 months ago (2016-10-14 23:37:32 UTC) #18
kraush
On 2016/10/14 23:37:32, Maria (OOO Oct 17-Oct 21) wrote: > https://codereview.chromium.org/2392763002/diff/60001/chrome/android/junit/src/org/chromium/chrome/browser/document/ChromeLauncherActivityTest.java > File > chrome/android/junit/src/org/chromium/chrome/browser/document/ChromeLauncherActivityTest.java ...
4 years, 2 months ago (2016-10-17 16:24:29 UTC) #19
Ted C
On 2016/10/17 16:24:29, kraush wrote: > On 2016/10/14 23:37:32, Maria (OOO Oct 17-Oct 21) wrote: ...
4 years, 2 months ago (2016-10-17 19:57:06 UTC) #20
kraush
On 2016/10/17 19:57:06, Ted C wrote: > > Hmm...very good points. I honestly don't have ...
4 years, 2 months ago (2016-10-19 16:17:00 UTC) #21
kraush
On 2016/10/19 16:17:00, kraush wrote: > On 2016/10/17 19:57:06, Ted C wrote: > > > ...
4 years, 2 months ago (2016-10-19 16:34:13 UTC) #22
kraush
Hi Ted, Hi Maria, Can you take a look at this new revision? - The ...
4 years, 2 months ago (2016-10-19 17:12:53 UTC) #23
Maria
Nice! I am very glad to see that you found a way to get bad ...
4 years, 1 month ago (2016-10-25 17:59:23 UTC) #24
kraush
I'll remove the unit test and address the comments. New revision incoming soon. https://codereview.chromium.org/2392763002/diff/80001/chrome/android/javatests/src/org/chromium/chrome/browser/document/LauncherActivityTest.java File ...
4 years, 1 month ago (2016-10-25 18:26:17 UTC) #25
kraush
Hi Maria, Can you take a look at this new revision? I've removed the unit ...
4 years, 1 month ago (2016-10-25 20:02:36 UTC) #26
Maria
lgtm
4 years, 1 month ago (2016-10-25 20:08:16 UTC) #27
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/2392763002/100001
4 years, 1 month ago (2016-10-25 20:26:51 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/293342) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 1 month ago (2016-10-25 20:30:01 UTC) #31
kraush
Fixed a trivial merge conflict. No need to re-review.
4 years, 1 month ago (2016-10-25 20:52:43 UTC) #32
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/2392763002/120001
4 years, 1 month ago (2016-10-25 20:53:22 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/167577)
4 years, 1 month ago (2016-10-25 21:14:16 UTC) #37
kraush
On 2016/10/25 21:14:16, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years, 1 month ago (2016-10-25 21:15:51 UTC) #38
kraush
On 2016/10/25 21:15:51, kraush wrote: > On 2016/10/25 21:14:16, commit-bot: I haz the power wrote: ...
4 years, 1 month ago (2016-10-25 22:33:26 UTC) #39
kraush
Ran a build with lint and fidbugs - both passed with this revision.
4 years, 1 month ago (2016-10-26 14:54:47 UTC) #40
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/2392763002/140001
4 years, 1 month ago (2016-10-26 14:55:13 UTC) #43
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 1 month ago (2016-10-26 15:35:00 UTC) #45
commit-bot: I haz the power
4 years, 1 month ago (2016-10-26 15:45:01 UTC) #47
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/4bca3b37801c502a164536b804879c00aba7d304
Cr-Commit-Position: refs/heads/master@{#427697}

Powered by Google App Engine
This is Rietveld 408576698