Skip to content

Commit 9c61155

Browse files
Merge pull request #9188 from minecrawler/feature/disable-xss-header
Remove XSS-Protection header from Nginx configs
2 parents 7dc0c71 + 7f87872 commit 9c61155

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

admin_manual/installation/harden_server.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,6 @@ These include:
221221

222222
- ``X-Content-Type-Options: nosniff``
223223
- Instructs some browsers to not sniff the mimetype of files. This is used for example to prevent browsers from interpreting text files as JavaScript.
224-
- ``X-XSS-Protection: 1; mode=block``
225-
- Instructs browsers to enable their browser side Cross-Site-Scripting filter.
226224
- ``X-Robots-Tag: noindex, nofollow``
227225
- Instructs search machines to not index these pages and not follow any links there.
228226
- ``X-Frame-Options: SAMEORIGIN``

admin_manual/installation/nginx-root.conf.sample

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ server {
7979
add_header X-Frame-Options "SAMEORIGIN" always;
8080
add_header X-Permitted-Cross-Domain-Policies "none" always;
8181
add_header X-Robots-Tag "noindex, nofollow" always;
82-
add_header X-XSS-Protection "1; mode=block" always;
8382

8483
# Remove X-Powered-By, which is an information leak
8584
fastcgi_hide_header X-Powered-By;

admin_manual/installation/nginx-subdir.conf.sample

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ server {
111111
add_header X-Frame-Options "SAMEORIGIN" always;
112112
add_header X-Permitted-Cross-Domain-Policies "none" always;
113113
add_header X-Robots-Tag "noindex, nofollow" always;
114-
add_header X-XSS-Protection "1; mode=block" always;
115114

116115
# Remove X-Powered-By, which is an information leak
117116
fastcgi_hide_header X-Powered-By;

admin_manual/release_notes/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ These sub pages will cover the most important changes in Nextcloud, as well as s
1414
.. toctree::
1515
:maxdepth: 1
1616

17+
upgrade_to_32.rst
1718
upgrade_to_31.rst
1819
upgrade_to_30.rst
1920
upgrade_to_28.rst
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
=======================
2+
Upgrade to Nextcloud 32
3+
=======================
4+
5+
System requirements
6+
-------------------
7+
8+
* PHP 8.1 is now deprecated but still supported.
9+
* PHP 8.4 is now supported, but 8.3 is recommended.
10+
11+
Web server configuration
12+
------------------------
13+
14+
* Setup checks do not check for the ``X-XSS-Protection`` response header anymore. It has been removed from Nextcloud's ``.htaccess`` and you may want to adjust your webserver config to not serve it anymore.
15+
XSS filtering was supported only until Chromium 78 and similarly old browsers, but had been found to cause more issues, including attack vectors, than it solved.
16+
Nowadays, aside of not serving the header at all, the only generally recommended value is ``0``. More context can be found in the `OWASP Cheat Sheet Series <https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html#x-xss-protection>`_.

0 commit comments

Comments
 (0)