Closed
Description
Happy to send a PR, but wanted to talk first:
I recently noticed there's a bunch of people trying to connect to untrusted sites using requests, superagent, etc. A bunch of answers to those questions are just
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"
Which is scary. There's two things that could be improved here:
- Make it explicit that the option is insecure
- Having a Boolean for a 'reject' option creates a weird double negative: you have to think you're rejecting unauthorised is false, and what that means (the answer being: you're accepting untrusted certs)
I propose:
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"
Be replaced with a more explicit, inverse option:
process.env.NODE_TLS_ACCEPT_UNTRUSTED_CERTIFICATES_THIS_IS_INSECURE = "1"
Or something similar. Any thoughts?