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

'unsafe-inline' 'unsafe-eval' directives for css and js #194

Closed
magarto opened this issue Jan 18, 2016 · 3 comments
Closed

'unsafe-inline' 'unsafe-eval' directives for css and js #194

magarto opened this issue Jan 18, 2016 · 3 comments

Comments

@magarto
Copy link

magarto commented Jan 18, 2016

Hi,

To improve security, 'unsafe-inline' 'unsafe-eval' directives for css and js must be disabled.
According to the following link which I quote at the end, in Nginx there is a header which can be added to secure it. I don't know which is the right header for lighttpd but must be similar.
If we add that security directive your application shows with errors in design. A screenshot can be found here: http://imgur.com/Yw9mP8a

https://gist.github.com/plentz/6737338

with Content Security Policy (CSP) enabled(and a browser that supports it(http://caniuse.com/#feat=contentsecuritypolicy),
you can tell the browser that it can only download content from the domains you explicitly allow
http://www.html5rocks.com/en/tutorials/security/content-security-policy/
https://www.owasp.org/index.php/Content_Security_Policy
I need to change our application code so we can increase security by disabling 'unsafe-inline' 'unsafe-eval'
directives for css and js(if you have inline css or js, you will need to keep it too).
more: http://www.html5rocks.com/en/tutorials/security/content-security-policy/#inline-code-considered-harmful
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://ssl.google-analytics.com https://assets.zendesk.com https://connect.facebook.net; img-src 'self' https://ssl.google-analytics.com https://s-static.ak.facebook.com https://assets.zendesk.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://assets.zendesk.com; font-src 'self' https://themes.googleusercontent.com; frame-src https://assets.zendesk.com https://www.facebook.com https://s-static.ak.facebook.com https://tautt.zendesk.com; object-src 'none'";

@dschaper
Copy link
Member

I don't quite understand what this issue is. Is there something that Pi-Hole is currently doing that is incorrect?

@PromoFaux
Copy link
Member

ping

@PromoFaux
Copy link
Member

Closing this issue. Reopened a thread in the AdminLTE repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants