-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Content-Security-Policy of images with GDrive on epub reader wrong #3108
Comments
Could you please send me the book in question via private email (email address from my profile page). I'd like to reproduce the issue myself |
Line 100 in a0728b0
It seems this bug will appear when google drive API is enabled. An epub3 sample book: Accessible EPUB 3 can reproduce this bug. I have a hot-fix and it just works for my conditions, but I'm not sure if its logic is ok. if request.endpoint == "edit-book.show_edit_book":
csp += " *;"
elif request.endpoint == "web.read_book":
csp += " blob:; style-src-elem 'self' blob: 'unsafe-inline';"
elif config.config_use_google_drive:
csp += " *;"
else:
csp += ";"
csp += " object-src 'none';" |
Fix csp Header for reader and google drive (#3108) Testrun
Please check the newest nightly version, should work now (hopefully without side effects) |
Describe the bug/problem
The image in epub viewer doesn't show due to Content Security Policy.
Relative: #3060
The text was updated successfully, but these errors were encountered: