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

[TODO] Improved security headers #821

Open
gpa opened this issue Aug 28, 2016 · 5 comments
Open

[TODO] Improved security headers #821

gpa opened this issue Aug 28, 2016 · 5 comments

Comments

@gpa
Copy link

gpa commented Aug 28, 2016

The code is missing some important headers

https://securityheaders.io/?q=http%3A%2F%2F104.131.8.128%2Flogin%2Findex&followRedirects=on

Here's facebook for comparsion:
https://securityheaders.io/?q=facebook.com&followRedirects=on
and google:
https://securityheaders.io/?q=https%3A%2F%2Faccounts.google.com%2FServiceLogin%3Fhl%3Dde%26passive%3Dtrue%26continue%3Dhttp%3A%2F%2Fwww.google.de%2F%253Fgfe_rd%253Dcr%2526ei%253DR7nCV-GEJc3b8AeWoYLwDQ&followRedirects=on

And while not implementing we should mention the importance of SSL in the readme file.

@panique
Copy link
Owner

panique commented Aug 28, 2016

Top stuff, thanks! I'll implements this (and other tasks) in the next weeks / asap!

@panique panique changed the title Missing headers [TODO] Improved security headers Dec 4, 2016
@ghost
Copy link

ghost commented Aug 23, 2017

@panique Any plans on adding this? :) I understand you have been extremely busy.

@sr-verde
Copy link
Contributor

To keep the project stable, clean and maintainable, I would kindly announce the "soft-End of Life" for this project, meaning:

A. HUGE will not get any new features in the future, but ... B. bugfixes and corrections will be made, probably for years

@CaptainKarma
Copy link

Hi,

Just to help some people out, to fix these errors you want to add this into your .htaccess file.

Please read up on the Content-Security-Policy as you will need to fine tune it for your needs. e.g I use cloudinary and call jquery from googleapis, so needed to add that to enable the scripts to run. An error is thrown in the browser's debug console so they are easy to fix.

Cheers

`
Goes into section mod_headers.c

Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" env=HTTPS

Header set Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' www.google-analytics.com *.cloudflare.com *.googleapis.com; style-src 'self' 'unsafe-inline'; img-src 'self' data: *.cloudflare.com *.cloudinary.com"

Header always set Referrer-Policy "same-origin"
Header set X-Content-Type-Options nosniff
Header set X-XSS-Protection "1; mode=block"
Header set X-Frame-Options "SAMEORIGIN"

<FilesMatch ".(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
Header unset X-Frame-Options
</FilesMatch
`

@ghost
Copy link

ghost commented Feb 24, 2019

@CaptainKarma or @panique kindly submit a pull request for this.

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

No branches or pull requests

4 participants