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

Issue 1059413004: Add a validator for intent:// URLs. (Closed)

Created:
5 years, 8 months ago by Chris Palmer
Modified:
5 years, 7 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a validator for intent:// URLs. BUG=462843, 482113 Committed: https://crrev.com/e8b8c72eb8eb462c52a707c556d53d350bbd408d Cr-Commit-Position: refs/heads/master@{#327613}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Allow Extras; require that standard keys appear only once; use Matchers; more test cases. #

Total comments: 3

Patch Set 3 : Handle extras as blobs. Add some tests using extras. #

Patch Set 4 : Defend against null dereferences. #

Patch Set 5 : Call each assert directly, to help debug tests. #

Patch Set 6 : Add logging to debug bot-only test failures. #

Patch Set 7 : Document the intent of the positive tests, too. #

Patch Set 8 : It seems URI does not like _ in hostnames? #

Patch Set 9 : The _ test reliably passes locally and fails on the bot; reversing the assert reliably reverses the… #

Patch Set 10 : Why are the presubmit checks different on the bots vs. local? import org.chromium.base.Log; #

Unified diffs Side-by-side diffs Delta from patch set Stats (+212 lines, -0 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java View 1 2 3 4 5 6 7 8 9 3 chunks +157 lines, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/UrlUtilitiesTest.java View 1 2 3 4 5 6 7 8 1 chunk +55 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (12 generated)
palmer
PTAL. Part 1 of 2. Thanks!
5 years, 8 months ago (2015-04-24 01:19:05 UTC) #2
Jaekyun Seok (inactive)
https://codereview.chromium.org/1059413004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java File chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java (right): https://codereview.chromium.org/1059413004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java#newcode238 chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java:238: || parts.length > 7 parts.length could be bigger than ...
5 years, 8 months ago (2015-04-24 02:05:52 UTC) #3
Yaron
https://codereview.chromium.org/1059413004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java File chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java (right): https://codereview.chromium.org/1059413004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java#newcode229 chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java:229: if (!Pattern.matches("^[\\w\\.-]*$", parsed.getHost())) { I would build a Matcher ...
5 years, 8 months ago (2015-04-24 16:04:18 UTC) #4
palmer
https://codereview.chromium.org/1059413004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java File chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java (right): https://codereview.chromium.org/1059413004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java#newcode229 chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java:229: if (!Pattern.matches("^[\\w\\.-]*$", parsed.getHost())) { > I would build a ...
5 years, 8 months ago (2015-04-24 18:05:22 UTC) #5
palmer
OK, see what you think now. Thanks!
5 years, 8 months ago (2015-04-24 18:14:01 UTC) #6
Yaron
https://codereview.chromium.org/1059413004/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java File chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java (right): https://codereview.chromium.org/1059413004/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java#newcode261 chrome/android/java/src/org/chromium/chrome/browser/UrlUtilities.java:261: if (2 != pair.length) return false; I think this ...
5 years, 8 months ago (2015-04-24 20:38:17 UTC) #7
palmer
OK, I think the new patchset handles extras about as well as we can. PTAL.
5 years, 7 months ago (2015-04-27 23:38:14 UTC) #8
palmer
Adding jcivelli FYI.
5 years, 7 months ago (2015-04-28 01:10:57 UTC) #10
Yaron
I think this now lgtm I guess one thing that it leaves a little open ...
5 years, 7 months ago (2015-04-28 01:35:34 UTC) #11
palmer
I filed https://code.google.com/p/chromium/issues/detail?id=482113 to track adding calls to validateIntentUrl now.
5 years, 7 months ago (2015-04-28 18:43:55 UTC) #12
palmer
I filed https://code.google.com/p/chromium/issues/detail?id=482113 to track adding calls to validateIntentUrl now.
5 years, 7 months ago (2015-04-28 18:43:58 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1059413004/40001
5 years, 7 months ago (2015-04-28 18:46:04 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/17104)
5 years, 7 months ago (2015-04-28 19:44:15 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1059413004/60001
5 years, 7 months ago (2015-04-28 20:10:27 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/17147)
5 years, 7 months ago (2015-04-28 21:15:22 UTC) #22
palmer
> Try jobs failed on following builders: > linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, > http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/17147) Does ...
5 years, 7 months ago (2015-04-29 17:52:21 UTC) #23
Yaron
On 2015/04/29 17:52:21, palmer wrote: > > Try jobs failed on following builders: > > ...
5 years, 7 months ago (2015-04-29 18:50:21 UTC) #24
Ted C
Is it the underscore in wump_hey (all others are wump-hey)? That doesn't look like it ...
5 years, 7 months ago (2015-04-29 18:55:09 UTC) #25
palmer
> Can you add logs to each early return to see which assert is failing? ...
5 years, 7 months ago (2015-04-29 19:06:05 UTC) #26
palmer
On 2015/04/29 18:55:09, Ted C wrote: > Is it the underscore in wump_hey (all others ...
5 years, 7 months ago (2015-04-29 19:07:35 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1059413004/160001
5 years, 7 months ago (2015-04-29 22:06:44 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/60060)
5 years, 7 months ago (2015-04-29 22:15:51 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1059413004/180001
5 years, 7 months ago (2015-04-29 22:59:03 UTC) #35
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years, 7 months ago (2015-04-29 23:28:19 UTC) #36
commit-bot: I haz the power
5 years, 7 months ago (2015-04-29 23:29:20 UTC) #37
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/e8b8c72eb8eb462c52a707c556d53d350bbd408d
Cr-Commit-Position: refs/heads/master@{#327613}

Powered by Google App Engine
This is Rietveld 408576698