WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
185567
X-Frame-Options: SAMEORIGIN needs to check all ancestor frames
https://bugs.webkit.org/show_bug.cgi?id=185567
Summary
X-Frame-Options: SAMEORIGIN needs to check all ancestor frames
Daniel Bates
Reported
2018-05-11 16:04:16 PDT
X-Frame-Options: SAMEORIGIN needs to check all ancestor frames.
Attachments
Patch and layout tests
(19.01 KB, patch)
2018-05-11 16:26 PDT
,
Daniel Bates
bfulgham
: review+
Details
Formatted Diff
Diff
For EWS
(18.71 KB, patch)
2018-05-11 20:06 PDT
,
Daniel Bates
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Daniel Bates
Comment 1
2018-05-11 16:04:24 PDT
<
rdar://problem/40175008
>
Daniel Bates
Comment 2
2018-05-11 16:04:48 PDT
Mozilla bug: <
https://bugzilla.mozilla.org/show_bug.cgi?id=725490
>
Daniel Bates
Comment 3
2018-05-11 16:04:55 PDT
Chrome issue: <
https://bugs.chromium.org/p/chromium/issues/detail?id=250309
>
Daniel Bates
Comment 4
2018-05-11 16:25:42 PDT
RFC: <
https://tools.ietf.org/html/rfc7034
>
Daniel Bates
Comment 5
2018-05-11 16:26:34 PDT
Created
attachment 340230
[details]
Patch and layout tests
EWS Watchlist
Comment 6
2018-05-11 16:28:39 PDT
Attachment 340230
[details]
did not pass style-queue: ERROR: Source/WebKit/ChangeLog:11: Please consider whether the use of security-sensitive phrasing could help someone exploit WebKit: malicious, malicious, malicious [changelog/unwantedsecurityterms] [3] ERROR: Source/WebCore/ChangeLog:11: Please consider whether the use of security-sensitive phrasing could help someone exploit WebKit: malicious, malicious, malicious [changelog/unwantedsecurityterms] [3] Total errors found: 2 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brent Fulgham
Comment 7
2018-05-11 16:31:36 PDT
Comment on
attachment 340230
[details]
Patch and layout tests View in context:
https://bugs.webkit.org/attachment.cgi?id=340230&action=review
r=me, but I have a few minor complaints about the patch I hope you can resolve before landing.
> Source/WebCore/loader/FrameLoader.cpp:3423 > + return true;
Ha! It's funny it was every written as a break, considering that the loop wasn't doing anything meaningful! :-)
> Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:419 > + if (!SecurityOrigin::create(url)->isSameSchemeHostPort(*m_parameters.sourceOrigin))
Do we need to create the SecurityOrigin twice?
> Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:421 > + for (auto& origin : m_parameters.frameAncestorOrigins) {
It's weird to have origin defined in two scopes, even though it apparently works. Could you name one the "sourceOrigin" or "topLevelOrigin" or something?
Daniel Bates
Comment 8
2018-05-11 18:39:18 PDT
Comment on
attachment 340230
[details]
Patch and layout tests View in context:
https://bugs.webkit.org/attachment.cgi?id=340230&action=review
>> Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:419 >> + if (!SecurityOrigin::create(url)->isSameSchemeHostPort(*m_parameters.sourceOrigin)) > > Do we need to create the SecurityOrigin twice?
Oops! Will fix before landing.
>> Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:421 >> + for (auto& origin : m_parameters.frameAncestorOrigins) { > > It's weird to have origin defined in two scopes, even though it apparently works. Could you name one the "sourceOrigin" or "topLevelOrigin" or something?
Oops! I hope you do not mind that I rename the loop variable ancestorOrigin to resolve this ambiguity.
Brent Fulgham
Comment 9
2018-05-11 19:57:09 PDT
Comment on
attachment 340230
[details]
Patch and layout tests View in context:
https://bugs.webkit.org/attachment.cgi?id=340230&action=review
>>> Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:421 >>> + for (auto& origin : m_parameters.frameAncestorOrigins) { >> >> It's weird to have origin defined in two scopes, even though it apparently works. Could you name one the "sourceOrigin" or "topLevelOrigin" or something? > > Oops! I hope you do not mind that I rename the loop variable ancestorOrigin to resolve this ambiguity.
That sounds like a great name!
Daniel Bates
Comment 10
2018-05-11 20:06:39 PDT
Created
attachment 340239
[details]
For EWS
EWS Watchlist
Comment 11
2018-05-11 20:07:55 PDT
Attachment 340239
[details]
did not pass style-queue: ERROR: Source/WebKit/ChangeLog:11: Please consider whether the use of security-sensitive phrasing could help someone exploit WebKit: malicious, malicious, malicious [changelog/unwantedsecurityterms] [3] ERROR: Source/WebCore/ChangeLog:11: Please consider whether the use of security-sensitive phrasing could help someone exploit WebKit: malicious, malicious, malicious [changelog/unwantedsecurityterms] [3] Total errors found: 2 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
Daniel Bates
Comment 12
2018-05-11 21:11:18 PDT
Committed
r231730
: <
https://trac.webkit.org/changeset/231730
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug