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

[#465] Sanitize header name on SlickGrid view #498

Merged
merged 1 commit into from Apr 9, 2016
Merged

[#465] Sanitize header name on SlickGrid view #498

merged 1 commit into from Apr 9, 2016

Conversation

smotornyuk
Copy link
Contributor

Change logic of sanitizing. Previously either original value
or content of element with matching selector was used as column
header.

After this change original value with applied encoding of
html entities will be used

Change logic of sanitizing. Previously either original value
or content of element with matching selector was used as column
header.

After this change original value with applied encoding of
html entities will be used
@rufuspollock
Copy link
Member

@smotornyuk does this avoid the security issue mentioned in #465 - i.e. does the html encoding preventing any js injection?

@amercader
Copy link
Contributor

@rgrp it does. @smotornyuk patch will escape any html entities, eg given

id,<script>alert('title')</script>,dog
1,Hi,Woof
2,Hola,Guau

The header will be parsed to &lt;script&gt;alert('title')&lt;/script&gt; and displayed like this (but without executing it) :

pj1fhkx

@rufuspollock
Copy link
Member

Great and @amercader sounds like you are happy with this so I'm merging.

Thanks @smotornyuk 👍

@rufuspollock rufuspollock merged commit 906af6b into datopian:master Apr 9, 2016
amercader added a commit to ckan/ckan that referenced this pull request Apr 15, 2016
amercader added a commit to ckan/ckan that referenced this pull request Jun 7, 2016
amercader added a commit to ckan/ckan that referenced this pull request Aug 26, 2016
amercader added a commit to ckan/ckan that referenced this pull request Aug 26, 2016
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.

None yet

3 participants