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

Issue 311033003: Implementing mixed content for forms posting to insecure location from secure ones (Closed)

Created:
6 years, 6 months ago by mhm
Modified:
6 years, 6 months ago
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Implementing mixed content for forms posting to insecure location from secure ones. When a form "action" attribute is pointing to insecure location from a secure one, this is flagged as mixed content. This is even checked if the pages dynamically changes the "action" attribute after the initial loading. The mixed content is non-blocking by default, however, this can be overridden in the preferences, and this will cause a submit to silently fail, other than a console message. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175714 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175926

Patch Set 1 : Adding mixed content to forms submitting to non-secure location from a secure one #

Total comments: 23

Patch Set 2 : Addressed reviewers comments and fixed formatting. #

Total comments: 7

Patch Set 3 : Adding comments and formatting. #

Patch Set 4 : Addressed reviewers comments, added counter for mixed content and made warning messages more develo… #

Total comments: 3

Patch Set 5 : Housekeeping a boolean that is not needed any more. #

Total comments: 8

Patch Set 6 : Addressed the comments by adding more counters, fixing the mixed content warning and cleaning code #

Total comments: 2

Patch Set 7 : Fixed the issues with applying the patch. #

Patch Set 8 : Fixing the patch errors. #

Total comments: 5

Patch Set 9 : Fixed the isse of incosistency with inspector #

Total comments: 4

Patch Set 10 : Moved the check for mixed content to a better location. #

Total comments: 8

Patch Set 11 : Addressing the previous comment and changing m_action to KURL. #

Total comments: 9

Patch Set 12 : Moved the code to check mixed content to the parseAttribute. #

Patch Set 13 : Fixed the error when action attribute is empty. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -46 lines) Patch
A + LayoutTests/http/tests/security/mixedContent/insecure-formSubmission-in-main-frame.html View 1 1 chunk +4 lines, -4 lines 0 comments Download
A + LayoutTests/http/tests/security/mixedContent/insecure-formSubmission-in-main-frame-allowed.html View 1 1 chunk +4 lines, -5 lines 0 comments Download
A LayoutTests/http/tests/security/mixedContent/insecure-formSubmission-in-main-frame-allowed-expected.txt View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/security/mixedContent/insecure-formSubmission-in-main-frame-blocked.html View 1 1 chunk +4 lines, -6 lines 0 comments Download
A LayoutTests/http/tests/security/mixedContent/insecure-formSubmission-in-main-frame-blocked-expected.txt View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/mixedContent/insecure-formSubmission-in-main-frame-expected.txt View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-formSubmission.html View 1 chunk +3 lines, -1 line 0 comments Download
M LayoutTests/http/tests/security/originHeader/resources/origin-header-post-to-http.html View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/frame/UseCounter.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLFormElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +23 lines, -8 lines 0 comments Download
M Source/core/loader/FormSubmission.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/loader/FormSubmission.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +4 lines, -5 lines 0 comments Download
M Source/core/loader/MixedContentChecker.h View 1 2 3 4 5 1 chunk +22 lines, -5 lines 0 comments Download
M Source/core/loader/MixedContentChecker.cpp View 1 2 3 4 5 6 7 8 9 10 4 chunks +23 lines, -8 lines 0 comments Download

Messages

Total messages: 64 (0 generated)
mhm
jww@ can you please review my cl.
6 years, 6 months ago (2014-06-04 01:04:13 UTC) #1
jww
Looking pretty good. Take a look at my comments and we'll circle back after you ...
6 years, 6 months ago (2014-06-05 03:49:45 UTC) #2
mhm
Uploading the CL soon addressing all the comments. https://codereview.chromium.org/311033003/diff/1/LayoutTests/http/tests/security/mixedContent/insecure-formSubmission-in-main-frame-allowed.html File LayoutTests/http/tests/security/mixedContent/insecure-formSubmission-in-main-frame-allowed.html (right): https://codereview.chromium.org/311033003/diff/1/LayoutTests/http/tests/security/mixedContent/insecure-formSubmission-in-main-frame-allowed.html#newcode14 LayoutTests/http/tests/security/mixedContent/insecure-formSubmission-in-main-frame-allowed.html:14: if ...
6 years, 6 months ago (2014-06-05 17:04:28 UTC) #3
mhm
Removed redundant checks of mixed content, report mixed content if the action changes from insecure ...
6 years, 6 months ago (2014-06-05 17:27:29 UTC) #4
jww
Awesome. LGTM, with two minor nits to your comments. https://codereview.chromium.org/311033003/diff/20001/Source/core/html/HTMLFormElement.cpp File Source/core/html/HTMLFormElement.cpp (right): https://codereview.chromium.org/311033003/diff/20001/Source/core/html/HTMLFormElement.cpp#newcode350 Source/core/html/HTMLFormElement.cpp:350: ...
6 years, 6 months ago (2014-06-05 17:35:05 UTC) #5
mhm
mkwst@ Can you please OWNER review this CL for me. https://codereview.chromium.org/311033003/diff/20001/Source/core/html/HTMLFormElement.cpp File Source/core/html/HTMLFormElement.cpp (right): https://codereview.chromium.org/311033003/diff/20001/Source/core/html/HTMLFormElement.cpp#newcode350 ...
6 years, 6 months ago (2014-06-05 17:47:44 UTC) #6
mhm
Apologies. The terminal was waiting for me to add a title :-) mkwst@ can you ...
6 years, 6 months ago (2014-06-05 17:49:36 UTC) #7
Mike West
Thanks for taking a stab at this. I think it needs one more pass, however. ...
6 years, 6 months ago (2014-06-05 17:51:26 UTC) #8
mhm
mkwst@ can you please have a look for an OWNER review? Addressed all the previously ...
6 years, 6 months ago (2014-06-05 22:56:53 UTC) #9
jww
Some nits. https://codereview.chromium.org/311033003/diff/60001/Source/core/html/HTMLFormElement.h File Source/core/html/HTMLFormElement.h (right): https://codereview.chromium.org/311033003/diff/60001/Source/core/html/HTMLFormElement.h#newcode187 Source/core/html/HTMLFormElement.h:187: bool m_insecureSubmissionReported; You seem to have added ...
6 years, 6 months ago (2014-06-05 23:00:49 UTC) #10
mhm
Thanks jww@ and apologies. mkwst@ I guess it should be clean now. https://codereview.chromium.org/311033003/diff/60001/Source/core/html/HTMLFormElement.h File Source/core/html/HTMLFormElement.h ...
6 years, 6 months ago (2014-06-05 23:07:06 UTC) #11
Mike West
https://codereview.chromium.org/311033003/diff/80001/Source/core/frame/UseCounter.h File Source/core/frame/UseCounter.h (right): https://codereview.chromium.org/311033003/diff/80001/Source/core/frame/UseCounter.h#newcode437 Source/core/frame/UseCounter.h:437: MixedContentForm = 436, I should have been more clear: ...
6 years, 6 months ago (2014-06-06 12:18:18 UTC) #12
mhm
mkwst@ can you please give it a look now? I addressed all the issues raised ...
6 years, 6 months ago (2014-06-06 19:11:59 UTC) #13
jww
Style nit. https://codereview.chromium.org/311033003/diff/100001/Source/core/loader/MixedContentChecker.h File Source/core/loader/MixedContentChecker.h (right): https://codereview.chromium.org/311033003/diff/100001/Source/core/loader/MixedContentChecker.h#newcode69 Source/core/loader/MixedContentChecker.h:69: Display, Style: Individual enum cases should be ...
6 years, 6 months ago (2014-06-06 19:19:52 UTC) #14
jww
https://codereview.chromium.org/311033003/diff/100001/Source/core/loader/MixedContentChecker.h File Source/core/loader/MixedContentChecker.h (right): https://codereview.chromium.org/311033003/diff/100001/Source/core/loader/MixedContentChecker.h#newcode69 Source/core/loader/MixedContentChecker.h:69: Display, On 2014/06/06 19:19:52, jww wrote: > Style: Individual ...
6 years, 6 months ago (2014-06-06 19:24:50 UTC) #15
Mike West
LGTM, thanks for going through a few iterations. :)
6 years, 6 months ago (2014-06-06 19:59:19 UTC) #16
mhm
The CQ bit was checked by mohammed@chromium.org
6 years, 6 months ago (2014-06-06 20:22:04 UTC) #17
mhm
On 2014/06/06 20:22:04, mhm wrote: > The CQ bit was checked by mailto:mohammed@chromium.org Thanks for ...
6 years, 6 months ago (2014-06-06 20:22:54 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mohammed@chromium.org/311033003/100001
6 years, 6 months ago (2014-06-06 20:22:58 UTC) #19
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-06 20:23:21 UTC) #20
commit-bot: I haz the power
Failed to apply patch for Source/core/frame/UseCounter.h: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 6 months ago (2014-06-06 20:23:22 UTC) #21
mhm
The CQ bit was checked by mohammed@chromium.org
6 years, 6 months ago (2014-06-06 20:55:31 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mohammed@chromium.org/311033003/120001
6 years, 6 months ago (2014-06-06 20:56:18 UTC) #23
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-06 20:56:31 UTC) #24
commit-bot: I haz the power
Failed to apply patch for Source/core/frame/UseCounter.h: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 6 months ago (2014-06-06 20:56:32 UTC) #25
mhm
The CQ bit was checked by mohammed@chromium.org
6 years, 6 months ago (2014-06-06 21:31:42 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mohammed@chromium.org/311033003/140001
6 years, 6 months ago (2014-06-06 21:32:53 UTC) #27
commit-bot: I haz the power
Change committed as 175714
6 years, 6 months ago (2014-06-06 22:44:31 UTC) #28
abarth-chromium
https://codereview.chromium.org/311033003/diff/140001/Source/core/html/HTMLFormElement.cpp File Source/core/html/HTMLFormElement.cpp (right): https://codereview.chromium.org/311033003/diff/140001/Source/core/html/HTMLFormElement.cpp#newcode68 Source/core/html/HTMLFormElement.cpp:68: return (action.isEmpty() ? document.url() : document.completeURL(action)); No need for ...
6 years, 6 months ago (2014-06-06 22:49:48 UTC) #29
abarth-chromium
A revert of this CL has been created in https://codereview.chromium.org/319183008/ by abarth@chromium.org. The reason for ...
6 years, 6 months ago (2014-06-06 22:53:01 UTC) #30
mhm
On 2014/06/06 22:53:01, abarth wrote: > A revert of this CL has been created in ...
6 years, 6 months ago (2014-06-07 00:05:30 UTC) #31
abarth-chromium
On 2014/06/07 at 00:05:30, mohammed wrote: > I see what you are saying (thanks jww@ ...
6 years, 6 months ago (2014-06-07 01:15:04 UTC) #32
mhm
abarth@ can you please have a look at it now. https://codereview.chromium.org/311033003/diff/140001/Source/core/html/HTMLFormElement.cpp File Source/core/html/HTMLFormElement.cpp (right): https://codereview.chromium.org/311033003/diff/140001/Source/core/html/HTMLFormElement.cpp#newcode68 ...
6 years, 6 months ago (2014-06-07 01:21:26 UTC) #33
abarth-chromium
https://codereview.chromium.org/311033003/diff/160001/Source/core/html/HTMLFormElement.cpp File Source/core/html/HTMLFormElement.cpp (right): https://codereview.chromium.org/311033003/diff/160001/Source/core/html/HTMLFormElement.cpp#newcode410 Source/core/html/HTMLFormElement.cpp:410: } It seems like we should do the mixed ...
6 years, 6 months ago (2014-06-07 08:59:50 UTC) #34
mhm
abarth@ please see my comments and have a look at this for me. https://codereview.chromium.org/311033003/diff/160001/Source/core/html/HTMLFormElement.cpp File ...
6 years, 6 months ago (2014-06-09 15:55:35 UTC) #35
abarth-chromium
On 2014/06/09 at 15:55:35, mohammed wrote: > mkwst@ suggested that we need to count three ...
6 years, 6 months ago (2014-06-09 16:21:49 UTC) #36
mhm
On 2014/06/09 16:21:49, abarth wrote: > On 2014/06/09 at 15:55:35, mohammed wrote: > > mkwst@ ...
6 years, 6 months ago (2014-06-09 16:25:53 UTC) #37
abarth-chromium
https://codereview.chromium.org/311033003/diff/180001/Source/core/html/HTMLFormElement.cpp File Source/core/html/HTMLFormElement.cpp (right): https://codereview.chromium.org/311033003/diff/180001/Source/core/html/HTMLFormElement.cpp#newcode405 Source/core/html/HTMLFormElement.cpp:405: KURL actionURL = getActionURL(document(), m_attributes.action()); You no longer need ...
6 years, 6 months ago (2014-06-09 16:31:38 UTC) #38
abarth-chromium
On 2014/06/09 at 16:25:53, mohammed wrote: > If we only get data for (iii) we ...
6 years, 6 months ago (2014-06-09 16:33:53 UTC) #39
mhm
On 2014/06/09 16:33:53, abarth wrote: > On 2014/06/09 at 16:25:53, mohammed wrote: > > If ...
6 years, 6 months ago (2014-06-09 17:24:05 UTC) #40
abarth-chromium
On 2014/06/09 17:24:05, mhm wrote: > I see your point now. > > One final ...
6 years, 6 months ago (2014-06-09 17:25:19 UTC) #41
mhm
abarth@ please let me know what do you thing now. https://codereview.chromium.org/311033003/diff/180001/Source/core/html/HTMLFormElement.cpp File Source/core/html/HTMLFormElement.cpp (right): https://codereview.chromium.org/311033003/diff/180001/Source/core/html/HTMLFormElement.cpp#newcode405 ...
6 years, 6 months ago (2014-06-09 20:20:35 UTC) #42
abarth-chromium
https://codereview.chromium.org/311033003/diff/200001/Source/core/html/HTMLFormElement.cpp File Source/core/html/HTMLFormElement.cpp (right): https://codereview.chromium.org/311033003/diff/200001/Source/core/html/HTMLFormElement.cpp#newcode43 Source/core/html/HTMLFormElement.cpp:43: #include "core/frame/csp/ContentSecurityPolicy.h" This header doesn't appear to be necessary. ...
6 years, 6 months ago (2014-06-09 22:06:24 UTC) #43
mhm
abarth@ O commented on your comments below. Please let me know what do you think. ...
6 years, 6 months ago (2014-06-09 23:27:59 UTC) #44
abarth-chromium
On 2014/06/09 at 23:27:59, mohammed wrote: > abarth@ O commented on your comments below. Please ...
6 years, 6 months ago (2014-06-10 00:06:13 UTC) #45
mhm
abarth@ I moved the check to parseAttribute. Please have a look at it now for ...
6 years, 6 months ago (2014-06-10 00:40:57 UTC) #46
abarth-chromium
lgtm
6 years, 6 months ago (2014-06-10 00:49:55 UTC) #47
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_blink_dbg on tryserver.blink ...
6 years, 6 months ago (2014-06-10 02:02:24 UTC) #48
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-10 02:32:55 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/11419)
6 years, 6 months ago (2014-06-10 02:32:56 UTC) #50
mhm
Fixed the case when the action attribute is empty Attributes::m_action need to be empty too. ...
6 years, 6 months ago (2014-06-10 20:42:33 UTC) #51
mhm
Fixed the case when the action attribute is empty Attributes::m_action need to be empty too. ...
6 years, 6 months ago (2014-06-10 20:42:36 UTC) #52
abarth-chromium
lgtm
6 years, 6 months ago (2014-06-10 20:50:09 UTC) #53
mhm
The CQ bit was checked by mohammed@chromium.org
6 years, 6 months ago (2014-06-10 20:51:27 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mohammed@chromium.org/311033003/240001
6 years, 6 months ago (2014-06-10 20:52:05 UTC) #55
mhm
The CQ bit was unchecked by mohammed@chromium.org
6 years, 6 months ago (2014-06-10 21:17:28 UTC) #56
mhm
The CQ bit was checked by mohammed@chromium.org
6 years, 6 months ago (2014-06-10 21:17:34 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mohammed@chromium.org/311033003/240001
6 years, 6 months ago (2014-06-10 21:18:01 UTC) #58
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_gpu_triggered_tests on tryserver.chromium.gpu ...
6 years, 6 months ago (2014-06-10 21:58:11 UTC) #59
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-10 21:58:33 UTC) #60
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered_tests/builds/15892)
6 years, 6 months ago (2014-06-10 21:58:33 UTC) #61
mhm
The CQ bit was checked by mohammed@chromium.org
6 years, 6 months ago (2014-06-10 22:38:46 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mohammed@chromium.org/311033003/240001
6 years, 6 months ago (2014-06-10 22:39:41 UTC) #63
commit-bot: I haz the power
6 years, 6 months ago (2014-06-10 22:42:52 UTC) #64
Message was sent while issue was closed.
Change committed as 175926

Powered by Google App Engine
This is Rietveld 408576698