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

Add setupcheck for Referrer-Policy header #9122

Closed
rullzer opened this issue Apr 9, 2018 · 9 comments
Closed

Add setupcheck for Referrer-Policy header #9122

rullzer opened this issue Apr 9, 2018 · 9 comments

Comments

@rullzer
Copy link
Member

rullzer commented Apr 9, 2018

See https://scotthelme.co.uk/a-new-security-header-referrer-policy/

We should probably check in the setupchecks if this header is set.

I would suggest to accept:

  • no-referrer
  • no-referrer-when-downgrade
  • strict-origin
  • strict-origin-when-cross-origin

@nextcloud/security @MorrisJobke

@MorrisJobke
Copy link
Member

We should probably check in the setupchecks if this header is set.

Makes sense, but only as warning and not as error. 👍

rullzer added a commit that referenced this issue Jun 2, 2018
Fixes #9122

Based on https://www.w3.org/TR/referrer-policy/ and
https://scotthelme.co.uk/a-new-security-header-referrer-policy/

Setting a sane Referrer-Policy will tell the browser if/when to send
referrer headers when accessing a link from Nextcloud. When configured
properly this results in less tracking and less leaking of (possibly)
sensitive urls

* Fix tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer rullzer added this to the Nextcloud 14 milestone Jun 3, 2018
rullzer added a commit that referenced this issue Jun 4, 2018
Fixes #9122

Based on https://www.w3.org/TR/referrer-policy/ and
https://scotthelme.co.uk/a-new-security-header-referrer-policy/

Setting a sane Referrer-Policy will tell the browser if/when to send
referrer headers when accessing a link from Nextcloud. When configured
properly this results in less tracking and less leaking of (possibly)
sensitive urls

* Fix tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@enoch85
Copy link
Member

enoch85 commented Aug 17, 2018

Which one of the headers do you recommend? Will change it in the upcoming release of the VM.

@MorrisJobke
Copy link
Member

Which one of the headers do you recommend? Will change it in the upcoming release of the VM.

Any of those.

Have a look at the linked page and choose the one that fits best into the VM setup. All of the 4 provide more privacy to the browsing user as it will not reveal too much information to the redirected page (for example getting a redirect from a share page would leak the share token).

@enoch85
Copy link
Member

enoch85 commented Aug 20, 2018

@MorrisJobke Thanks! I set strict-origin. Reveals some, but not too much.

@ghost
Copy link

ghost commented Aug 20, 2018

@MorrisJobke @enoch85 How do i set this and where?

@enoch85
Copy link
Member

enoch85 commented Aug 20, 2018

@andyxh It's in your virtual host for either Nginx or Apache.

The VM will have it from NC 14 and onwards.

@ghost
Copy link

ghost commented Aug 20, 2018 via email

@enoch85
Copy link
Member

enoch85 commented Aug 20, 2018

@andyboeh You need to change it n your virtual host:

It's in your virtual host for either Nginx or Apache.

Here is an example.

@ghost
Copy link

ghost commented Aug 20, 2018 via email

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

No branches or pull requests

3 participants