◐ Shell
clean mode source ↗

tls: convertProtocols() error handling by pugbyte · Pull Request #23606 · nodejs/node

The convertProtocols() function now throws a range error when the byte
length of a protocol is too long to fit in a Buffer.

Also added a test case in test/parallel/test-tls-basic-validations.js
to cover this.

@nodejs-github-bot added the tls

Issues and PRs related to the tls subsystem.

label

Oct 12, 2018

addaleax

addaleax

Changed the byte length error message for protocol to correctly state
that the length must be <= 255 not < 255

Amended the test case in test/parallel/test-tls-basic-validations.js

addaleax

@addaleax addaleax added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Oct 12, 2018

@jasnell jasnell added the semver-major

PRs that contain breaking changes and should be released in the next major version.

label

Oct 12, 2018

mcollina

@Trott Trott added the code-and-learn

Issues related to the Code-and-Learn events and PRs submitted during the events.

label

Oct 12, 2018

BridgeAR

@BridgeAR BridgeAR removed the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Oct 12, 2018
Also changed corresponding usage in lib/tls.js

Amended the test case in test/parallel/test-tls-basic-validations.js

thefourtheye

@addaleax addaleax added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Oct 16, 2018

BridgeAR

@BridgeAR BridgeAR removed the semver-major

PRs that contain breaking changes and should be released in the next major version.

label

Oct 17, 2018

targos pushed a commit that referenced this pull request

Oct 24, 2018
The convertProtocols() function now throws a range error when the byte
length of a protocol is too long to fit in a Buffer.

Also added a test case in test/parallel/test-tls-basic-validations.js
to cover this.

PR-URL: #23606
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>

This was referenced

Nov 2, 2018

codebytere pushed a commit that referenced this pull request

Dec 13, 2018
The convertProtocols() function now throws a range error when the byte
length of a protocol is too long to fit in a Buffer.

Also added a test case in test/parallel/test-tls-basic-validations.js
to cover this.

PR-URL: #23606
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>

MylesBorins pushed a commit that referenced this pull request

Dec 26, 2018
The convertProtocols() function now throws a range error when the byte
length of a protocol is too long to fit in a Buffer.

Also added a test case in test/parallel/test-tls-basic-validations.js
to cover this.

PR-URL: #23606
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>

codebytere added a commit that referenced this pull request

Jan 29, 2019
* doc:
  * add oyyd to collaborators (Ouyang Yadong) [#24300](#24300)
* tls:
  * throw if protocol too long (Andre Jodat-Danbrani) [#23606](#23606)

codebytere added a commit that referenced this pull request

Jan 29, 2019
* doc:
  * add oyyd to collaborators (Ouyang Yadong) [#24300](#24300)
* tls:
  * throw if protocol too long (Andre Jodat-Danbrani) [#23606](#23606)

PR-URL: #25346

This was referenced

Jan 29, 2019