From e24118217607d7dc8afd40b859da079e5526cb3f Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 1 May 2024 18:24:26 +0200 Subject: [PATCH] excludes the use of bad-formed html forms, used to steal information without the user's knowledge --- ...ing-attributes-in-some-html-elements.patch | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/build/patches/Log-dangling-attributes-in-some-html-elements.patch b/build/patches/Log-dangling-attributes-in-some-html-elements.patch index bee40632..de36c2d2 100644 --- a/build/patches/Log-dangling-attributes-in-some-html-elements.patch +++ b/build/patches/Log-dangling-attributes-in-some-html-elements.patch @@ -14,6 +14,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../blink/renderer/core/dom/element.cc | 20 ++++++++++++++++- third_party/blink/renderer/core/dom/element.h | 3 ++- .../editing/serializers/markup_formatter.cc | 9 ++++++++ + .../core/html/forms/html_form_element.cc | 2 +- .../renderer/core/html/html_base_element.cc | 6 +++++ .../renderer/core/html/html_base_element.h | 2 ++ .../core/html/html_frame_element_base.cc | 10 +++++++++ @@ -22,7 +23,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../core/loader/frame_load_request.cc | 9 ++++++++ .../blink/renderer/core/page/frame_tree.cc | 22 +++++++++++++++++++ .../platform/runtime_enabled_features.json5 | 10 +++++++-- - 13 files changed, 131 insertions(+), 4 deletions(-) + 14 files changed, 132 insertions(+), 5 deletions(-) create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Log-dangling-attributes-in-some-html-elements.inc diff --git a/cromite_flags/chrome/browser/about_flags_cc/Log-dangling-attributes-in-some-html-elements.inc b/cromite_flags/chrome/browser/about_flags_cc/Log-dangling-attributes-in-some-html-elements.inc @@ -150,6 +151,18 @@ diff --git a/third_party/blink/renderer/core/editing/serializers/markup_formatte } EntityMask entity_mask = +diff --git a/third_party/blink/renderer/core/html/forms/html_form_element.cc b/third_party/blink/renderer/core/html/forms/html_form_element.cc +--- a/third_party/blink/renderer/core/html/forms/html_form_element.cc ++++ b/third_party/blink/renderer/core/html/forms/html_form_element.cc +@@ -318,7 +318,7 @@ void HTMLFormElement::PrepareForSubmission( + if (form_control_element && form_control_element->BlocksFormSubmission()) { + UseCounter::Count(GetDocument(), + WebFeature::kFormSubmittedWithUnclosedFormControl); +- if (RuntimeEnabledFeatures::UnclosedFormControlIsInvalidEnabled()) { ++ if (((true)) || RuntimeEnabledFeatures::UnclosedFormControlIsInvalidEnabled()) { + String tag_name = To(element)->tagName(); + GetDocument().AddConsoleMessage(MakeGarbageCollected( + mojom::ConsoleMessageSource::kSecurity, diff --git a/third_party/blink/renderer/core/html/html_base_element.cc b/third_party/blink/renderer/core/html/html_base_element.cc --- a/third_party/blink/renderer/core/html/html_base_element.cc +++ b/third_party/blink/renderer/core/html/html_base_element.cc @@ -318,7 +331,7 @@ diff --git a/third_party/blink/renderer/core/page/frame_tree.cc b/third_party/bl diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -1542,8 +1542,8 @@ +@@ -1543,8 +1543,8 @@ // Experiment with preventing some instances of mutation XSS // by escaping "<" and ">" in attribute values. // See: crbug.com/1175016 @@ -329,7 +342,7 @@ diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 }, { name: "EventTimingInteractionCount", -@@ -2319,6 +2319,12 @@ +@@ -2320,6 +2320,12 @@ name: "MacFontsDeprecateFontTraitsWorkaround", status: "stable", },