Skip to content

Conversation

@milesbxf
Copy link
Contributor

Currently the API (and Slack app) allows users to enter any text they like for various fields - this has security implications if we end up rendering that text in a UI page down the line. Django UI templating handles this case automatically, but other types of UI consuming the API won't - here we sanitize input (using https://pypi.org/project/bleach/) before it gets saved to the DB.

)

def save(self, *args, **kwargs):
print(type(self.text))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accidentally left in?

setup.py Outdated
INSTALL_REQUIRES = [
"Django>=2.2",
"bleach==3.1.0",
"bleach-whitelist>=0.0.11",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a typo? I can only see 0.0.10 on pypi https://pypi.org/project/bleach-whitelist/

@ChrisAnn ChrisAnn merged commit ba9643d into master Oct 7, 2019
@ChrisAnn ChrisAnn deleted the sanitize-user-input branch October 7, 2019 09:43
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.

3 participants