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

Strip unsafe characters out of JSONP callbacks to prevent XSS #502

Closed
wants to merge 1 commit into from

Conversation

rgrove
Copy link

@rgrove rgrove commented Jan 13, 2011

Will send another pull request with a backported fix for the 1.x branch.

This prevents JSONP callbacks from being used as an XSS vector. The set
of acceptable characters is intentionally more limited than the full
set of valid characters in JS identifiers in order to avoid complexity,
but this could be expanded in the future if necessary.
@tj
Copy link
Member

tj commented Jan 25, 2011

thanks!

This pull request was closed.
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

2 participants