Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

TLS Client 'rejectUnauthorized' must default to true #3949

Closed
hueniverse opened this issue Aug 30, 2012 · 9 comments
Closed

TLS Client 'rejectUnauthorized' must default to true #3949

hueniverse opened this issue Aug 30, 2012 · 9 comments
Labels

Comments

@hueniverse
Copy link

No idea why server cert validation is off by default. This is a major security issue since the vast majority of developers are not aware of this and will leave it as-is. If you fail to check the server's certificate, you have zero protection against a long list of attacks.

Yes - changing the default is likely to break stuff. THAT'S A GOOD THING!

@benadida
Copy link

Agreed, this is a big no no. Security by default! Don't be like PHP :)

@benlaurie
Copy link

+1

3 similar comments
@skenqbx
Copy link

skenqbx commented Aug 30, 2012

+1

@achselschweisz
Copy link

+1

@tellnes
Copy link

tellnes commented Aug 30, 2012

+1

@bnoordhuis
Copy link
Member

For review: https://github.com/bnoordhuis/node/compare/tls-reject-unauthorized

To be investigated: test/simple/test-https-pfx.js fails when you set rejectUnauthorized explicitly. The expected validation error changes from UNABLE_TO_GET_ISSUER_CERT to DEPTH_ZERO_SELF_SIGNED_CERT.

@koichik
Copy link

koichik commented Sep 1, 2012

@bnoordhuis - The patch LGTM, but API docs (just default values)?

@bnoordhuis
Copy link
Member

Addressed in 35607f3.

@hueniverse
Copy link
Author

Fantastic! Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants