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

Consider returning "nosniff" for JSONP responses #38

Closed
onebytegone opened this issue Mar 21, 2019 · 2 comments
Closed

Consider returning "nosniff" for JSONP responses #38

onebytegone opened this issue Mar 21, 2019 · 2 comments
Assignees

Comments

@onebytegone
Copy link
Contributor

As part of preventing Rosetta Flash, express sets the X-Content-Type-Options header to nosniff. lambda-express already has the /**/ mitigation, however should nosniff also be added?

See also: https://helmetjs.github.io/docs/dont-sniff-mimetype/

@jthomerson
Copy link
Member

Good find. Yes, let's add the same type of header-setting logic as Express. Also, let's add some comments in the code that clearly indicate that a) the nosniff header, b) the JS comment, and c) the typeof check are all mitigations against Rosetta Flash. Comment should reference this ticket.

@onebytegone
Copy link
Contributor Author

Closed with #42.

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

No branches or pull requests

2 participants