-
Notifications
You must be signed in to change notification settings - Fork 831
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
Patches to prevent XSS #893
Conversation
/uncc @jklaise |
/cc @cliveseldon |
LGTM, @cliveseldon @ryandawsonuk @MarcoGorelli good to go? |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cliveseldon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
020631f
to
7fd80a0
Compare
This PR addresses issues #837 and #892, which were both related to Cross-Site Scripting (XSS) vulnerabilities.
Fix for issue #837
The fix for issue #837 is pretty straightforward. Before, we were explicitly disabling the HTML escaping. It seems enough to just remove that line. The HTML characters are escaped to their corresponding unicode sequence, so it shouldn't impact anything else downstream.
Fix for issue #892
The fix for issue #892 adds a
Filter
to the requests'sFilterChain
inspring
. The only function of this filter is appending the new header to all responses.The
spring-security
package also allows to do this automatically, however it also brings a lot of other things to the table (e.g. user authentication, other headers, etc). We could disable each of these extra features, but it seems safer to just add aFilter
.