Skip to content

https: disallow boolean types for `key` and `cert` options

Rodrigo Muino Tomonari requested to merge github/fork/jimmycann/issue/12802 into master

This is my first PR on the Node repository, your feedback is greatly appreciated.

When using https.createServer, passing boolean values for key and cert properties in the options object parameter doesn't throw an error an could lead to potential issues if they're accidentally passed.

This PR aims to throw a reasonable error if a boolean was passed to either of those properties.

Fixes: https://github.com/nodejs/node/issues/12802

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

https

Merge request reports

Loading