Skip to content
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

Allow iframing any other sites #630

Merged
merged 2 commits into from
Jul 18, 2024
Merged

Conversation

wwwillchen
Copy link
Collaborator

@wwwillchen wwwillchen commented Jul 18, 2024

Closes #628.

frame-src (i.e. iframing other sites) is fairly low-risk and we may as well allow iframing any site. This is different than frame-ancestors which is much more security sensitive and has a strict allowlist.

Background: https://cheatsheetseries.owasp.org/cheatsheets/Content_Security_Policy_Cheat_Sheet.html#preventing-framing-attacks-clickjacking-cross-site-leaks

@wwwillchen wwwillchen marked this pull request as ready for review July 18, 2024 02:27
@richard-to
Copy link
Collaborator

Does iframing an http site from say an https pose an concerns? In this case, it's definitely the developer's choice. But I did kind of like the current setting that prevented the https -> http iframing case as a kind of safe guard for people who were not thinking about that.

@wwwillchen
Copy link
Collaborator Author

Does iframing an http site from say an https pose an concerns? In this case, it's definitely the developer's choice. But I did kind of like the current setting that prevented the https -> http iframing case as a kind of safe guard for people who were not thinking about that.

I don't think so. Even if you had a weird situation where the parent frame was https://foo.com and it iframed http://foo.com (this would be pretty unusual because usually if a site supports https, then the http would redirect to https), there's not really an additional risk because they would be considered separation origins (which is basically subdomain + protocol).

@wwwillchen wwwillchen merged commit e337801 into google:main Jul 18, 2024
3 checks passed
@wwwillchen wwwillchen deleted the frame_src branch July 18, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not able to iframe a localhost site from a localhost site (or http site)
2 participants