-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[Bug]: Security warning inaccurately reports that X-Robots-Tag header isn't "noindex, nofollow", documentation links broken #37357
Comments
cc @MichaIng |
@wwklnd you should split your reports in 3 please:
This will lead to a better follow up. Thanks 👍 |
This was and is the same with all headers Nextcloud checks for: If there are two identical headers, it intentionally prints the warning, even if both contain the same "correct" value. We do not know how (and which) search engines deal with two headers, whether they respect the stronger, the weaker, the first, the second or none. It makes sense IMO to expect a single unambiguous header value, since its about the security and privacy of your data. Find the source for the second header, eliminate it, and the warning will be resolved. Or ignore it and hope for the best. I guess you use the Apache2 webserver? The
Is is actually supported/intended to update a Nextcloud Docker container via admin panel? I thought, and it makes sense, to update it only with the container itself. Would be quite a logical explanation that the NC25 Docker container's Nginx config still ships the I can confirm the broken integrity check shortcut link. Actually the whole NC26 docs version is missing: https://docs.nextcloud.com/server/26/ |
I can confirm that i had the Warning with Nginx, after upgrade from 25.0.4 to 25.0.5, because I had a configuration file setting the header to After changing that file to |
Ah, sorry! I'll do that! |
Ah! That makes sense.
This also makes sense, I wasn't sure if
I've always run upgrades from the admin panel before without issue, so I thought that was the proper way to do it. I'm using the
Thank you for the extensive reply! I appreciate it. :) |
Thank you for the reply, I went and changed this in the |
If this is a Docker container, I guess using the Nextcloud updater is not intended. If I'm not mistaken, it is possible to disable it via |
@MichaIng The Nextcloud updater is listed as the first option in the container readme, with the caveat that the latest image should be pulled first. I spoke to one of the |
It is however quite an uncommon way of using Docker containers and breaks major benefits/intentions of using them. One of the major points of using Docker containers is that you have a fixed setup which is precisely composed so that all components are assured to work with each other, in this case database, PHP, webserver and web application, possible Redis server and others. Containers are usually not designed/intended to be manipulated by accessing the internal console and change the system. The same way it is usually not intended to update software within the container, but only to update the whole container image and use it like that until a new updated image is available. Also, not only are all your customisations lost with a container upgrade, also the software (Nextcloud) update could be reverted if a new container does not yet ship the latest software version. Sticking with only container updates would have prevented all your tree issues + the missing |
I updated from 25.0.4 to 25.0.5 and also got that warning, which is a bug in itself, as "none" (which is what I had) is equivalent to "noindex, nofollow" (see https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag), to Nextcloud should not warn if the header value is "none". |
|
I had to find the relevant commit (5f90b8e) to know the rationale for this change, which I could not find in this thread here (which only mentions the issue of having duplicate headers). So OK. |
Right, compare with latest docs as well: https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html |
where do i have to set this? |
Depends on your webserver and config structure. The same place where you set the |
NC runs at a Debian Container Apache Webserver behind an other container running Nginx Reverse Proxy manager. |
With Apache webserver, you just need to take care that NPM forwards the I assume that this Apache webserver generally reads |
For nginx the new setting from the documentation didn't help. I changed my /etc/nginx/sites-enabled/....conf (where ... is my website): - add_header X-Robots-Tag "none" always;
+ # add_header X-Robots-Tag "none" always;
+ add_header X-Robots-Tag "noindex, nofollow" always; Then:
Version: Nextcloud Hub 6 (27.1.0) |
Verify that the header really is set, e.g. like curl -I 127.0.0.1 |
yes:
|
This is not the Nextcloud instance, is it? Is it within a sub directory, like curl -IL 127.0.0.1/nextcloud |
Ugh good point. The setting isn't showing up if I put /nextcloud in the URL after
section it is fixed now (Someone make an Nginx configuration GUI, and not just a text editor). Thank you. |
This is one of the things I do not like about Nginx: Once a location/if/... block contains any
|
Bug description
I updated Nextcloud Server to 26.0.0 today, and faced some odd issues. My setup went from no warnings to this:
I checked both the
.htaccess
file and the actual HTTP headers. Firefox reports two X-Robots-Tag headers, one of which reads "none" and one of which reads "noindex, nofollow", so the warning is correct about one header but incorrect overall. I'm not sure where the "none" comes from, though.When I click the "documentation ↗" link, it takes me to this page which simply shows a "File not found." message in black on white. The same thing happens with the "installation guide ↗" link, here.
Apart from this, after upgrading to 26.0.0 I also noticed that my user avatar had its colours inverted, but only in the top right corner, which seems incredibly odd. Image for reference, showing what the image looks like on my user profile (which renders it properly):
Steps to reproduce
Expected behavior
Installation method
Community Docker image
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.0
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Updated to a major version (ex. 22.2.3 to 23.0.1)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
No response
Additional info
I installed Nextcloud using the
linuxserver/nextcloud
docker image, but I don't believe this should be relevant to the problem.The text was updated successfully, but these errors were encountered: