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

Website CSP prevents evaluating code in page #811

Closed
zbyna opened this issue Dec 2, 2020 · 5 comments · Fixed by #1191
Closed

Website CSP prevents evaluating code in page #811

zbyna opened this issue Dec 2, 2020 · 5 comments · Fixed by #1191
Labels
blocked This issue can't be solved because of another problem. webextension-limitation This issue is blocked by a webextension limitation
Milestone

Comments

@zbyna
Copy link

zbyna commented Dec 2, 2020

  • OS Version: Linux x86-64 4.8.17-040817-generic, KDE SC 4.13.2

  • Browser Version: Firefox 83 (64bit)

  • Browser Addon Version: 0.1.32

  • Neovim Plugin Version: 0.1.32

  • What I tried to do:

  • What happened:

    • For the first time text fields can not be focused and edited, the second attempt (after page reloading) allows editing but without firenvim's features.
    • I have tried clean Firefox profile with only firenvim installed.
    • Other sites works well.
@glacambre
Copy link
Owner

This happens because the site's CSP prevents evaluating code in the page. There's nothing I can do unfortunately :/. You can permanently disable firenvim on this website with the following configuration:

let g:firenvim_config = {
  \ 'localSettings': {
    \ 'https?://hosted\.weblate\.org': {
      \ 'takeover': 'never'
    \ }
  \ }
\ }

@glacambre glacambre added the webextension-limitation This issue is blocked by a webextension limitation label Dec 2, 2020
@glacambre glacambre changed the title Hosted.weblate.org does not work Website CSP prevents evaluating code in page Dec 2, 2020
@zbyna
Copy link
Author

zbyna commented Dec 2, 2020

Thanks for explanation. Creator of weblate.org does not care about nvim embedding see: WeblateOrg/weblate#4963 (comment)

@zbyna zbyna closed this as completed Dec 2, 2020
@alerque
Copy link
Contributor

alerque commented Dec 2, 2020

How does this relate to #145?

@glacambre
Copy link
Owner

@alerque It falls in the same category as #145 but while #145 will be fixed by the patch I sent to Mozilla, #811 won't.

@zbyna I'll re-open this issue, maybe one day I'll find the time to write a firefox patch to fix this :)

@glacambre glacambre reopened this Dec 3, 2020
@glacambre glacambre added the blocked This issue can't be solved because of another problem. label Jan 13, 2021
glacambre added a commit that referenced this issue Sep 25, 2021
This fixes CSP issues thanks to the change I made to editor-adapter in
v0.0.3.

Closes #811
@glacambre glacambre added this to the Next milestone Sep 25, 2021
glacambre added a commit that referenced this issue Sep 25, 2021
This fixes CSP issues thanks to the change I made to editor-adapter in
v0.0.3.

Closes #811
@glacambre
Copy link
Owner

glacambre commented Sep 25, 2021

It took a lot of effort but I managed to fix this on master. The fix will reach you once I publish a new release :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This issue can't be solved because of another problem. webextension-limitation This issue is blocked by a webextension limitation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants