You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a second tusted domain (MY_SECOND_DOMAIN) is called, the image-logo URL is loaded from the cache which shows to https://MY_DOMAIN/core/img/logo.svg?v=CACHE_BUSTER and therefore results in the following browser error:
Refused to load the image 'https://MY_DOMAIN/core/img/background.jpg?v=CACHE_BUSTER' because it violates the following Content Security Policy directive: "img-src 'self' data: blob:".
I inspected the nextcloud code a bit and think in this two lines the function $this->urlGenerator->getAbsoluteURL() has to be removed:
Ok, this fixes the issue. But why not save all URLs without base URL for css files? Then you wouldn't need separate cache entries for each trusted domain and therefore could reduce complexity. Or wouldn't it be backwards compatible?
Steps to reproduce
Expected behaviour
Showing logo and background image an all trusted domains using memcache.
Actual behaviour
The first request of
/apps/theming/styles?v=CACHE_BUSTER
creates the following entry for the keyUNIQUE_ID/theminggetScssVariables
in the APCu cache:If a second tusted domain (
MY_SECOND_DOMAIN
) is called, the image-logo URL is loaded from the cache which shows tohttps://MY_DOMAIN/core/img/logo.svg?v=CACHE_BUSTER
and therefore results in the following browser error:I inspected the nextcloud code a bit and think in this two lines the function
$this->urlGenerator->getAbsoluteURL()
has to be removed:I did this fix in my current installation and it works so far.
If you want, I can start a pull request.
Server configuration
Nextcloud version: 12.0.0
Nextcloud configuration:
Config report
Client configuration
Browser: Chrome Version 58.0.3029.110
The text was updated successfully, but these errors were encountered: