Commit 09f25af
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 dd5afbe commit 09f25afCopy full SHA for 09f25af
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 |
|---|---|---|
| ||
825 | 825 | |
826 | 826 | |
827 | 827 | |
828 | | - |
829 | | - |
| 828 | + |
| 829 | + |
| 830 | + |
830 | 831 | |
831 | | - |
| 832 | + |
832 | 833 | |
833 | 834 | |
834 | 835 | |
|
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 | |
| ||
60 | 63 | |
61 | 64 | |
62 | 65 | |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
63 | 70 | |
64 | 71 | |
65 | 72 | |
|
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 |
|---|---|---|
| ||
102 | 102 | |
103 | 103 | |
104 | 104 | |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | + |
0 commit comments