这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@ibacher
Copy link
Member

@ibacher ibacher commented Nov 16, 2024

Tries to limit the application of the XSS filter.

@dkayiwa
Copy link
Member

dkayiwa commented Nov 16, 2024

Will this prevent someone from submitting stored XSS via our REST calls?

@ibacher
Copy link
Member Author

ibacher commented Nov 16, 2024

In so far as they work on form parameters, it will. We need a slightly different solution for the REST API, though, as HTML-encoding will break anything where we expect the client to submit XML since, e.g.,

<?xml version="1.0"?>
<document />

Becomes

&lt;?xml version="1.0"?&gt;
&lt;document /&gt;

which won’t be parsed correctly. Basically for REST, we need to HTML encode the values as they are deserialised.

@Abhxay
Copy link

Abhxay commented Aug 5, 2025

Hey!

Just a small suggestion: I didn’t see any new or updated tests for this. Adding test coverage to check the filter behavior on form vs. non-form requests might help catch issues in the future

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants