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

Revert dict tab focus fix and sandbox dict tab iframes #473

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

cblanken
Copy link
Contributor

@cblanken cblanken commented Aug 24, 2024

One possible solution to prevent dictionary iframes from stealing focus is to
enable the CSP sandbox on each iframe. If a bare sandbox attribute is used,
then autofocus from iframes should be blocked. Unfortunately this has the side
effect of blocking some online dictionary that require additional feature
policies such as allow-same-origin and allow-scripts.

In particular the following dictionaries mentioned in issue #469 require these policies
to load correctly:

One possible solution to preven dictionary iframes from stealing focus is to
enable the CSP sandbox on each iframe. If a bare `sandbox` attribute is used,
then autofocus from iframes should be blocked. Unfortunately this has the side
effect of blocking some online dictionary that require additional feature
policies such as `allow-same-origin` and `allow-scripts`.

In particular the following dictionaries mentioned in issue LuteOrg#469 require these policies
to load correctly:
- https://korean.dict.naver.com/koendict/#/search?query=###
- https://en.dict.naver.com/#/search?query=###
@jzohrab
Copy link
Collaborator

jzohrab commented Aug 24, 2024

Hi @cblanken - I wonder if this should be split out further, with one PR just to revert the existing change, and another to add the sandbox etc attributes in that new line. I wouldn't want to "fix" one problem just to cause another. Then we could look at the extra policy stuff more carefully. Thoughts?

@jzohrab
Copy link
Collaborator

jzohrab commented Aug 24, 2024

Chatted briefly w/ @cblanken on discord, this is a draft idea to investigate sandboxing only. I'll revert the old PR, will keep this as an idea only for sandboxing investigations. Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants