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

Bookmarklets are now working on Github.com #1730

Closed
ArthurHoaro opened this issue Apr 5, 2021 · 1 comment · Fixed by #1767
Closed

Bookmarklets are now working on Github.com #1730

ArthurHoaro opened this issue Apr 5, 2021 · 1 comment · Fixed by #1767
Assignees
Milestone

Comments

@ArthurHoaro
Copy link
Member

I just noticed that bookmarklets seem to be working again on Github.com, while it was blocked before due to Content Security Policy (CSP) - see #196. It seems to work with both Firefox and Chrome. Can someone else confirm that?

I don't remember which website blocked it as well, so I'm not sure if Github changed something, or if it's due to CSP implementation in browsers.

In any case the documentation should be updated if it's really working: https://shaarli.readthedocs.io/en/master/Troubleshooting/#the-bookmarklet-doesnt-work

@ArthurHoaro ArthurHoaro added this to the 0.13.0 milestone Apr 5, 2021
@nodiscc
Copy link
Member

nodiscc commented Apr 5, 2021

Can confirm the bookmarklet is working again for me on this very page. Strange.

The CSP header is

content-security-policy | default-src 'none'; base-uri 'self'; block-all-mixed-content; connect-src 'self' uploads.github.com www.githubstatus.com  collector.githubapp.com api.github.com github-cloud.s3.amazonaws.com  github-production-repository-file-5c1aeb.s3.amazonaws.com  github-production-upload-manifest-file-7fdce7.s3.amazonaws.com  github-production-user-asset-6210df.s3.amazonaws.com cdn.optimizely.com logx.optimizely.com/v1/events wss://alive.github.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com online…com;  frame-ancestors 'none'; frame-src render.githubusercontent.com; img-src  'self' data: github.githubassets.com identicons.github.com  collector.githubapp.com github-cloud.s3.amazonaws.com secured-user-images.githubusercontent.com/ *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; worker-src github.com/socket-worker-3f088aa2.js gist.github.com/socket-worker-3f088aa2.js

If I remember correctly the bookmarklet used to require script-src 'unsafe-inline' to work, but the only script-src allowed here is github.githubassets.com... 🤔

Firefox ESR 78.9.0esr-1~deb10u1

@nodiscc nodiscc self-assigned this May 25, 2021
nodiscc added a commit to nodiscc/Shaarli that referenced this issue Jun 17, 2021
- left generic paragraph about this problem in place, since the problem may still be present on other sites
- closes shaarli#1730
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants