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

Strings going through REST API should be sanitized before sending #4076

Closed
ichorid opened this issue Nov 30, 2018 · 1 comment
Closed

Strings going through REST API should be sanitized before sending #4076

ichorid opened this issue Nov 30, 2018 · 1 comment
Assignees

Comments

@ichorid
Copy link
Contributor

ichorid commented Nov 30, 2018

At this moment, when we send a string through the REST API we don't check if the string contains symbols that participate in request parsing, such as &?=, etc.
Consequently, the string could be broken down in a wrong way and/or manipulated for an injection attack.
For example, trying to download a torrent with & in its name results in a broken title in the downloads list that only contains the first word. (e.g. Cucumbers&Tomatoes will result in adding the download as just Cucumbers )

To solve it, we have to filter all our REST strings through urlencode filter, like described in
https://stackoverflow.com/questions/5607551/how-to-urlencode-a-querystring-in-python

Related to #3406

@ichorid ichorid added this to the V7.2: Gigachannels milestone Nov 30, 2018
@ichorid ichorid changed the title Strings going throug REST API should be sanitized before sending Strings going through REST API should be sanitized before sending Jan 13, 2019
@ichorid ichorid self-assigned this Jan 17, 2019
@ichorid
Copy link
Contributor Author

ichorid commented Feb 23, 2019

Mostly solved by #4090. Solving it completely. Would require a complete redesign of our REST endpoints implementation. This work should be done as a part of formalization effort, like #3406

@ichorid ichorid closed this as completed Feb 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant