Skip to content

SOLR-111 : Validate JSONP callback function name to avoid XSS #4

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

seboo
Copy link

@seboo seboo commented Jul 31, 2018

callback function name in JSONP requests must match "[_\-A-Za-z0-9]+"

@jonenst
Copy link
Member

jonenst commented Jul 31, 2018

Remove '-' and add '$' ? cf https://stackoverflow.com/questions/2008279/validate-a-javascript-function-name

(if you wanted to keep '-', you could put it at the end so that you don't have to escape it)

@seboo
Copy link
Author

seboo commented Aug 1, 2018

I modified the pattern to exclude "-" and include "$", and put it in properties file

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.

2 participants