Skip to content
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

Merged
merged 19 commits into from
Oct 10, 2019
Merged

Patches to prevent XSS #893

merged 19 commits into from
Oct 10, 2019

Conversation

adriangonz
Copy link
Contributor

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's FilterChain in spring. 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 a Filter.

@axsaucedo
Copy link
Contributor

/uncc @jklaise

@seldondev seldondev removed the request for review from jklaise October 3, 2019 18:54
@axsaucedo
Copy link
Contributor

/cc @cliveseldon

@adriangonz adriangonz self-assigned this Oct 8, 2019
@axsaucedo
Copy link
Contributor

LGTM, @cliveseldon @ryandawsonuk @MarcoGorelli good to go?

@ukclivecox
Copy link
Contributor

/approve

@seldondev
Copy link
Collaborator

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants