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 out Express typeof check from JSONP #66

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

Conversation

dhurrell
Copy link

Express server adds a 'typeof' check to JSONP responses to reduce client error noise (and an empty comment for security). See:
https://github.com/strongloop/express/blob/4.13.3/lib/response.js#L312-L314

Example output:
http://ibl.api.bbci.co.uk/?callback=notReal

The extension does not currently recognise such output as JSONP. This pull request fixes that by stripping out the 'typeof' check before checking whether the response is valid. It closes #49.

Express server adds a 'typeof' check to JSONP responses to reduce client
error noise (and an empty comment for security). See:
https://github.com/strongloop/express/blob/4.13.3/lib/response.js#L312-L314

Strip this out before checking whether or not the response is JSONP.
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.

Rosetta Flash JSONP abuse in ExpressJS
1 participant