-
-
Couldn't load subscription status.
- Fork 4.6k
Update X-XSS-Protection recommendation #53711
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
Conversation
|
Just found #53476 which addresses pretty much the same, and probably in a more consequent way. Keeping the check for this ancient header which is not supported anymore by any browser since 2019, doesn't really make sense. And OWASP also suggests to just not set it at all, as alternative to explicitly disabling XSS filtering. |
While `1; mode=block` was seen as the most secure value for this header, some years ago, after possible side-channel attacks have become known, this turned towards `0` being the best-practice value, disabling XSS filtering entirely for those old browsers who still support it. MDN web docs give some explanation: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-XSS-Protection#security_considerations The OWASP cheat sheet recommends `0`: https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html#x-xss-protection Here the related discussion when this recommendation was updated: OWASP/CheatSheetSeries#376 A Stack Overflow question underlines the clear recommendation, adding some more details: https://stackoverflow.com/questions/9090577 Since `1; mode=block` is not a large security risk, it affects only very old browsers, and a changed recommendation will (sadly) trigger a lot of issues/topics in forum and GitHub, the old value however is allowed to pass the check. So to pass the check, either page blocking needs to be enabled along with XSS filtering, or XSS filtering needs to be disabled. The warning however will always suggest to disable it. Signed-off-by: MichaIng <[email protected]>
bcc49fb to
9160fdc
Compare
|
After sleeping a night over it and another thought, I am closing this PR in favor or #53476. If for whatever reason a majority thinks it makes more sense to keep the check for now, just accepting |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
X-XSS-Protectionrecommendation is deprecated #37154Summary
While
1; mode=blockwas seen as the most secure value for this header, some years ago, after possible side-channel attacks have become known, this turned towards0being the best-practice value, disabling XSS filtering entirely for those old browsers who still support it.MDN web docs give some explanation: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-XSS-Protection#security_considerations
The OWASP cheat sheet recommends
0: https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html#x-xss-protectionHere the related discussion when this recommendation was updated: OWASP/CheatSheetSeries#376
A Stack Overflow question underlines the clear recommendation, adding some more details: https://stackoverflow.com/questions/9090577
Since
1; mode=blockis not a large security risk, it affects only very old browsers, and a changed recommendation will (sadly) trigger a lot of issues/topics in forum and GitHub, the old value however is allowed to pass the check. So to pass the check, either page blocking needs to be enabled along with XSS filtering, or XSS filtering needs to be disabled. The warning however will always suggest to disable it.TODO
.htaccessChecklist