-
Notifications
You must be signed in to change notification settings - Fork 196
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
WebEngine (Chromium) Images not Working #533
Comments
Thank you for the report! Looks like it worked with Qt 5.14 but stopped working with Qt 5.15. I will investigate further. |
I am terribly sorry for the delay. This is now fixed in master branch, maybe you can check if the fix works for you? |
Thank you for the fix. I tested this fix from the master branch, and it is working on my system without problems. Good work :-) |
Without this, Qt WebEngine 5.15 does not load local images even by relative paths. Originally this setting was added as a security measure, to prevent malicious content from stealing user data and sending it to an attacker's server. But Qt 5.15 started to treat images with relative paths as file: URLs, so we can no longer forbid access to them. So we introduce a new security measure: pages now cannot load local content using XMLHttpRequests. This should be enough to prevent them from reading files from JS code. Fixes #533. (cherry picked from commit 9391835) Adapted for retext-7.1 branch: use old-style enum to make it work with PyQt < 5.11.
Thanks for testing! Pushed the fix also to retext-7.1 branch. |
When using the Qt WebEngine for preview, local images are not loaded.
This can be fixed by commenting or removing the following lines from webenginepreview.py file:
I guess there was a reason to add these lines, so this may cause bug or security issue elsewhere. If you have multiple settings there, only remove or enable the
LocalContentCanAccessFileUrls
setting.The text was updated successfully, but these errors were encountered: