-
AuthorPosts
-
February 20, 2017 at 3:34 pm #749397
Hi,
I have a website with HTTPS build using Enfold, and the styles are not loading in Safari.
It give me this error: Refused to apply a stylesheet because its hash, its nonce, or ‘unsafe-inline’ appears in neither the style-src directive nor the default src directive of the Content Secutiry Policy.
Theme: Enfold
Version: 3.7
Installed: enfold
AviaFramework Version: 4.5.3
AviaBuilder Version: 0.9
– – – – – – – – – – –
ChildTheme: Enfold Child
ChildTheme Version: 1.0
ChildTheme Installed: enfoldML:128-PU:86-PLA:5
WP:4.6.3Is there a way to solve this? On other browsers works like a charm.
Thanks
February 21, 2017 at 7:22 am #749757Hey incuca,
Could you try updating your theme to the latest version (3.8.5) to see if that helps please? http://kriesi.at/documentation/enfold/updating-your-theme-files/
Best regards,
RikardFebruary 21, 2017 at 10:27 pm #750175Hi Rikard,
we’ve updated the theme to 3.8.5, but still the problem persists.
:(
February 21, 2017 at 10:33 pm #750177Hey!
Can you please install a plugin that can clear your transients and do let us know if that will solve your issue?
Thank you very muchCheers!
BasilisFebruary 22, 2017 at 1:33 pm #750469Hey guys, thanks for the tips.
I installed a “Transient Cleaner” plugin and clear all the transients, but it is still breaking on Safari cause of the stylesheets not loading ” ‘unsafe-inline’ appears neither the style-src” etc etc.
Any other ideas?
February 28, 2017 at 7:53 am #752761Hi,
Could you please provide a screenshot of the error or the stylesheet with the “unsafe-inline” value? I can’t reproduce it on my safari.
Best regards,
IsmaelSeptember 11, 2017 at 11:45 pm #850710Sorry for bumping this old thread, but was this ever resolved (it looks unresolved)?
I’m guessing it wasn’t or ‘unsafe-inline’ was added to the CSP.
Not allowing ‘unsafe-inline’ in Content-Security-Policy (CSP) is recommended, however it breaks Enfold (and others) since a lot of functionality is added as inline script (not external files).For others searching your options are pretty much limited to adding ‘unsafe-inline’ or adding hundreds of allowed hashes (which will be a pain to keep updated).
There’s some pretty good information on your options: https://scotthelme.co.uk/content-security-policy-an-introduction/September 13, 2017 at 5:18 am #851344Hi,
The user didn’t reply so we’re not sure if it’s resolved or not. Are you experiencing the same issue? Please provide a link to the site and a screenshot.
Best regards,
IsmaelSeptember 13, 2017 at 1:35 pm #851567Hey guys, just to give you some light, the problem was resolved on the server side (Apache). It is in portuguese, but you can translate with Google :)
Com relação ao problema detectado no navegador Internet Explorer:
Problema apresentado: Fontes e alguns ícones não eram carregados, ou carregados de maneira incorreta.
Solução: Ajuste nas configurações relacionadas ao Header HTTP Header no Virtual Host HTTPS no Apache HTTPD. O trecho que estava causando problema:
Header Set Cache-Control “no-cache, no-store, must-revalidate, private”
Header Set Pragma “no-cache”
Substituído por:
Header Set Cache-Control “no-cache, must-revalidate, private”
A primeira diretiva foi reajustada e a segunda diretiva foi removida pois estava causando problema. “Pragma” tem apenas a função de manter compatibilidade com clientes HTTP 1.0, ou seja, sem necessidade para os browsers atuais. Segundo a RFC 2616, ambos podem coexistir, mas por algum motivo que não identifiquei está causando esta “quebra” no IE 10, 11.Com relação ao problema detectado no navegador Safari:
Problema apresentado: Página totalmente desformatada devido a bloqueio no carregamento de diversos elementos que compõem a interface. Bloqueios estes causados por diretivas CSP definidas no header através do cabeçalho:
Header set X-WebKit-CSP: “default-src ‘self'”
A solução de contorno foi remover essa configuração do Virtual Host do Apache HTTPD. Iremos reavaliar a documentação do CSP para ajustar as diretivas de modo a permitir o carregamento dos elementos necessários. Por enquanto, iremos deixar desta forma.September 13, 2017 at 1:54 pm #851575Well that has very little to do with the underlying issue, even though it quite possible was a workaround for you.
The issue is that the CSP guides “strongly recommends” against using inline script and styling (evals too). I’m not too familiar with Avia framework and the inner workings of Enfold, but my guess is this is how it works (and will continue to work) by design.
In short (but not completely accurate): Some browsers (currently) enforce CSP versions differently from others. Your solution/workaround was to remove this safeguard completely.
A solução de contorno foi remover essa configuração do Virtual Host do Apache HTTPD. Iremos reavaliar a documentação do CSP para ajustar as diretivas de modo a permitir o carregamento dos elementos necessários. Por enquanto, iremos deixar desta forma.
My previous answer basically says that if you want to use enfold you have to lower your security enforcement/policy. CSP is a great safeguard against XSS and such exploits and by using ‘unsafe-inline’ config directive (or not using CSP at all) you expose yourself to this risk. Note that I’m not saying specifically that this makes Enfold theme unsafe to use. You just need to be aware that you cannot use this mitigation technique (which is quite common for important sites).
Edit:
To further clarify this is more of a WP issue than it is an Enfold issue. As a security minded admin it was a pain and I’ll keep updating/posting on the relevance of the initial error ‘unsafe-inline’ CSP directive.September 14, 2017 at 7:07 am #851865September 14, 2017 at 4:18 pm #852143hi , i’m not sure but .. I think to have the same problem
using enternet explorer mobile vercion , my web site works bad, could you please contoll and tell me a solution ?
thank yousite http://www.hotescortlivorno.com/escort-livorno/
- This reply was modified 7 years, 2 months ago by Marco.
September 15, 2017 at 10:26 am #852451 -
AuthorPosts
- You must be logged in to reply to this topic.