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

Unable to edit page on mzh.moegirl.org.cn, blank in annotation editor with Content Security Policy errors (but open success, saved with smaller size) #1458

Open
SineObama opened this issue May 19, 2024 · 2 comments

Comments

@SineObama
Copy link

Describe the bug

  • Unable to edit page on mzh.moegirl.org.cn, but it may be OK on other website.
  • In annotation editor, it has lots of console error like: Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem:". Either the 'unsafe-inline' keyword, a hash ('sha256-l242OUtjusUMGZVX2kId1Cju50oEaNyqlG4aUhIjSZQ='), or a nonce ('nonce-...') is required to enable inline execution.
  • I found it may be related to the settings: NOT blocking javascript, saving as self-extracting ZIP (universal).

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://mzh.moegirl.org.cn/Phigros/%E6%9B%B2%E7%9B%AE%E5%88%97%E8%A1%A8
  2. Click context menu "Annotate and save the page..."
  3. When annotation editor was opened, the page displays content instantly after opening, but immediately turns blank.
  4. Save the page. I found the file size is smaller than saving directly.
  5. The page can be opened and displays correctly.

Expected behavior
Able to edit the page content. Actually at the beginning I want to remove the message popup on the top when not blocking javascript. (But I fail hiding the element on the page before saving.)

Screenshots

Environment

  • OS: Win11
  • Browser: Chrome 124.0.6367.158 / 360ChromeX 22.3.3015.64 core 122.0.6261.95
  • Version: SingleFile 1.22.47

Additional context
My settings:
singlefile-settings-2024-05-19T07_03_54.660Z.json

@gildas-lormeau
Copy link
Owner

Actually, the problem is that the scripts in the page are not supported in the annotation editor. Moreover, I was unable to save the page properly (by clicking on the SingleFile button). You have to block scripts when saving this page.

@SineObama
Copy link
Author

Actually, the problem is that the scripts in the page are not supported in the annotation editor. Moreover, I was unable to save the page properly (by clicking on the SingleFile button). You have to block scripts when saving this page.

but I can save the page (by clicking on the SingleFile button or after using annotation editor), it's confuseing.

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

No branches or pull requests

2 participants