-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undeprecate X-Frame-Options #25663
Undeprecate X-Frame-Options #25663
Conversation
This was discussed in a Web App Sec WG meeting and it was the opinion of many that this warning should be removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that the current wording of the deprecated banner is unfortunate, especially if it prompts users to remove the header without a corresponding CSP policy.
However, I don't think we should unmark this feature as deprecated in BCD just to get rid of the corresponding banner on MDN. It is a legacy feature after all, and BCD's notion of deprecated features includes this.
There is ongoing work by @Rumyra et al. to replace the banners this year, so we might want to wait until then.
If we see urgency, we might be able to adjust the wording to avoid that users draw the wrong conclusions.
/cc @Rumyra
I would argue that in this case the functionality isn't deprecated though even by BCDs definition. There's nothing wrong with using the header, it's never going to be removed. When you need more granularity or if you're otherwise using CSP then frame-ancestors is an alternative. But setting X-frame-options to deny or sameorigin is a legitimate approach? |
BCD's guidelines actually mention the word "legacy" explicitly, see: https://github.com/mdn/browser-compat-data/blob/main/docs/data-guidelines/index.md#setting-deprecated Is there a good reason to call this feature "legacy" in the spec, if it doesn't convey any notion of discouragement regarding it's use? |
The way I see it we have three options:
|
I agree the "legacy" wording in the spec is a little unclear. I've raised this issue to discuss that further: whatwg/html#10936 However I read the guidelines that the use of that word is "evidence for setting it to true" it is not a necessity, particularly given this comment:
Discouraging By discouraging |
@Elchi3 @ddbeck Any concerns with un-deprecating this header? The corresponding HTML spec change removing the "legacy" wording has landed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
FYI @wbamberg
Thanks for everyone's help on this one! |
@Elchi3 @wbamberg Is the status on the MDN page synced automatically? Edit: Looks like @OnkarRuikar does this manually? |
It's automated. From https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Page_structures/Feature_status#how_are_feature_statuses_specified_in_content:
|
i think the status is automated by the custom message about |
Oh yes, you're right, sorry I missed that. I've merged the content PR. |
Summary
Unmark X-Frame-Options as deprecated
Test results and supporting details
This was added in #24466
When people view the X-Frame-Options page they're presented with:
A warning that says this feature may be removed from browsers isn't helpful for a security feature that we realistically cannot remove from browsers.
By all means MDN can and should (and does per mdn/content#35942) point to CSP frame-ancestors as a (more powerful) alternative, this is deprecation warning isn't useful nor accurate.
Related issues