Commit 3170cb4
tls: throw if protocol too long
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>1 parent 15d05bb commit 3170cb4Copy full SHA for 3170cb4
File tree
Expand file treeCollapse file tree
3 files changed
+25
-4
lines changedOpen diff view settings
Filter options
- lib
- internal
- test/parallel
Expand file treeCollapse file tree
3 files changed
+25
-4
lines changedOpen diff view settings
Collapse file
+4-3Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
834 | 834 | |
835 | 835 | |
836 | 836 | |
837 | | - |
838 | | - |
| 837 | + |
| 838 | + |
| 839 | + |
839 | 840 | |
840 | | - |
| 841 | + |
841 | 842 | |
842 | 843 | |
843 | 844 | |
|
Collapse file
+8-1Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
21 | 21 | |
22 | 22 | |
23 | 23 | |
24 | | - |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
25 | 28 | |
26 | 29 | |
27 | 30 | |
| ||
59 | 62 | |
60 | 63 | |
61 | 64 | |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
62 | 69 | |
63 | 70 | |
64 | 71 | |
|
Collapse file
test/parallel/test-tls-basic-validations.js
Copy file name to clipboardExpand all lines: test/parallel/test-tls-basic-validations.js+13Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
115 | 115 | |
116 | 116 | |
117 | 117 | |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
0 commit comments