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

Adding X-Content-Type-Options: nosniff header #305

Merged
merged 1 commit into from
Jun 23, 2016

Conversation

roblg
Copy link
Member

@roblg roblg commented Jun 23, 2016

Protects some browsers (Chrome, IE) against MIME sniffing attacks. (Does not help Firefox
due to: https://bugzilla.mozilla.org/show_bug.cgi?id=471020)

More info: http://security.stackexchange.com/a/12916

@doug-wade
Copy link
Collaborator

oh shit I didn't realize the appveyor stuff had snuck out of #304 💩

@doug-wade
Copy link
Collaborator

I disabled the webhook, but I'm not sure what is to be done about the failing check

@roblg
Copy link
Member Author

roblg commented Jun 23, 2016

@doug-wade do you mean what to be done in general about the failing check? I'm pretty sure I have permissions to merge without it passing.

@@ -299,6 +299,9 @@ function writeHeader(req, res, context, start, pageObject) {
res.type('html');
res.set('Transfer-Encoding', 'chunked');

// e.g., http://security.stackexchange.com/a/12916
res.set('X-Content-Type-Options', 'nosniff');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This misses a case. Will push fix shortly.

@roblg roblg force-pushed the add-content-type-options-nosniff branch from 2cb04ea to 2c64d3c Compare June 23, 2016 22:07
@@ -199,6 +199,9 @@ function renderPage(req, res, context, start, page) {

var timer = logger.timer("lifecycle.individual");

// e.g., http://security.stackexchange.com/a/12916
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Protects some browsers (Chrome, IE) against MIME sniffing attacks.

^ That would be nice to include in the comment here.

It gives the headline so I know whether I'm interested in following the link.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can do

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@doug-wade
Copy link
Collaborator

😌
screen shot 2016-06-23 at 3 26 40 pm

Protects some browsers against MIME sniffing attacks. (Does not help Firefox
due to: https://bugzilla.mozilla.org/show_bug.cgi?id=471020)
@roblg roblg force-pushed the add-content-type-options-nosniff branch from 2c64d3c to ebce502 Compare June 23, 2016 22:36
@gigabo
Copy link
Contributor

gigabo commented Jun 23, 2016

Thanks @roblg. Added a security tag just for this. 👍

@gigabo gigabo merged commit 761312a into redfin:master Jun 23, 2016
davidalber pushed a commit to davidalber/react-server that referenced this pull request Jul 24, 2016
Protects some browsers against MIME sniffing attacks. (Does not help Firefox
due to: https://bugzilla.mozilla.org/show_bug.cgi?id=471020)
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.

3 participants