nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.63k stars 3.99k forks source link

[Bug]: X-Frame-Options is obsoleted by CSP frame-ancestors and is not checked in security overview #34748

Open sevmonster opened 1 year ago

sevmonster commented 1 year ago

⚠️ This issue respects the following points: ⚠️

Bug description

X-Frame-Options has been obsoleted by Content-Security-Policy's frame-ancestors directive and the security check should pass if either are present, instead of just checking X-Frame-Options. Documentation and the server scanner may also need to be updated if this change is made.

Steps to reproduce

  1. Set header Content-Security-Policy: frame-ancestors 'self' https://somesite.com
  2. Visit the server security overview page or test the server with the server scanner
  3. Receive warning about X-Frame-Options

Expected behavior

Only show warning if both X-Frame-Options and Content-Security-Policy are missing, potentially encourage users to include CSP frame-ancestors instead of/and replace SAMEORIGIN.

Installation method

No response

Operating system

No response

PHP engine version

No response

Web server

No response

Database engine version

No response

Is this bug present after an update or on a fresh install?

No response

Are you using the Nextcloud Server Encryption module?

No response

What user-backends are you using?

Configuration report

No response

List of activated Apps

unnecessary

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

HLFH commented 1 year ago

Similar issue with the XSS-Protection Header. The security overview says that the "X-XSS-Protection" header does not contain "1; mode=block" because I have disabled it as recommended by Hardenize and Mozilla, as seen in the first commit of this PR: https://github.com/nextcloud/documentation/pull/9188.