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

Issue 2628723004: Experiment with restricting form submission with open elements. (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-html_chromium.org, chromium-reviews, dglazkov+blink, kinuko+watch, loading-reviews+parser_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Experiment with restricting form submission with open elements. HTML's parsing mechanism will automatically close form controls at the end of a file. This is fine from a parsing perspective, but the behavior does enable dangling markup attacks, such as those described in http://www.thespanner.co.uk/2011/12/21/html-scriptless-attacks/ and section 2 of http://lcamtuf.coredump.cx/postxss/. Based on some discussion at https://github.com/whatwg/html/issues/2253, this patch adds metrics to measure how often this happens in the wild for `<textarea>` and `<select>` elements, and an experimental flag which prevents form submission in the presence of those elements if they're closed by reaching the end-of-file. BUG=680462 Review-Url: https://codereview.chromium.org/2628723004 Cr-Commit-Position: refs/heads/master@{#443544} Committed: https://chromium.googlesource.com/chromium/src/+/ab7a0ee9d3485c19da8b50af2d1cfc95fd6e4a98

Patch Set 1 #

Patch Set 2 : More specific. #

Patch Set 3 : s/invalid/error/ #

Patch Set 4 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+170 lines, -3 lines) Patch
A third_party/WebKit/LayoutTests/http/tests/security/dangling-markup/option.html View 1 1 chunk +52 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/dangling-markup/resources/helper.js View 1 2 1 chunk +37 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/dangling-markup/textarea.html View 1 1 chunk +35 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/resources/postmessage-post.php View 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/UseCounter.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFormControlElement.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp View 1 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFormElement.cpp View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLElementStack.cpp View 1 2 chunks +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp View 1 2 chunks +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 28 (21 generated)
Mike West
jochen@: WDYT of the experiment in general? csharrison@: Would you mind evaluating the //core/html/parser bits ...
3 years, 11 months ago (2017-01-12 12:02:04 UTC) #4
jochen (gone - plz use gerrit)
lgtm
3 years, 11 months ago (2017-01-12 13:08:24 UTC) #5
Charlie Harrison
parser lgtm
3 years, 11 months ago (2017-01-12 13:39:05 UTC) #6
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/2628723004/40001
3 years, 11 months ago (2017-01-13 10:56:04 UTC) #20
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/341552)
3 years, 11 months ago (2017-01-13 11:01:26 UTC) #22
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/2628723004/60001
3 years, 11 months ago (2017-01-13 11:12:56 UTC) #25
commit-bot: I haz the power
3 years, 11 months ago (2017-01-13 13:31:22 UTC) #28
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/ab7a0ee9d3485c19da8b50af2d1c...

Powered by Google App Engine
This is Rietveld 408576698