Commit 46ded6b
esm: protect ESM loader from prototype pollution
Fixes: #45035
PR-URL: #45044
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent f222c95 commit 46ded6bCopy full SHA for 46ded6b
File tree
Expand file treeCollapse file tree
8 files changed
+67
-6
lines changedOpen diff view settings
Filter options
- lib/internal
- bootstrap
- modules/esm
- test
- es-module
- parallel
Expand file treeCollapse file tree
8 files changed
+67
-6
lines changedOpen diff view settings
Collapse file
lib/internal/bootstrap/loaders.js
Copy file name to clipboardExpand all lines: lib/internal/bootstrap/loaders.js+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
53 | 53 | |
54 | 54 | |
55 | 55 | |
| 56 | + |
56 | 57 | |
57 | 58 | |
58 | 59 | |
| ||
281 | 282 | |
282 | 283 | |
283 | 284 | |
| 285 | + |
| 286 | + |
284 | 287 | |
285 | 288 | |
286 | 289 | |
|
Collapse file
lib/internal/modules/esm/load.js
Copy file name to clipboardExpand all lines: lib/internal/modules/esm/load.js+2-1Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
59 | 59 | |
60 | 60 | |
61 | 61 | |
62 | | - |
| 62 | + |
63 | 63 | |
64 | 64 | |
65 | 65 | |
| ||
93 | 93 | |
94 | 94 | |
95 | 95 | |
| 96 | + |
96 | 97 | |
97 | 98 | |
98 | 99 | |
|
Collapse file
lib/internal/modules/esm/loader.js
Copy file name to clipboardExpand all lines: lib/internal/modules/esm/loader.js+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
676 | 676 | |
677 | 677 | |
678 | 678 | |
| 679 | + |
679 | 680 | |
680 | 681 | |
681 | 682 | |
| ||
892 | 893 | |
893 | 894 | |
894 | 895 | |
| 896 | + |
895 | 897 | |
896 | 898 | |
897 | 899 | |
|
Collapse file
lib/internal/modules/esm/module_job.js
Copy file name to clipboardExpand all lines: lib/internal/modules/esm/module_job.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
215 | 215 | |
216 | 216 | |
217 | 217 | |
218 | | - |
| 218 | + |
219 | 219 | |
220 | 220 | |
221 | 221 | |
|
Collapse file
lib/internal/modules/esm/resolve.js
Copy file name to clipboardExpand all lines: lib/internal/modules/esm/resolve.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1083 | 1083 | |
1084 | 1084 | |
1085 | 1085 | |
1086 | | - |
| 1086 | + |
1087 | 1087 | |
1088 | 1088 | |
1089 | 1089 | |
|
Collapse file
test/es-module/test-cjs-prototype-pollution.js
Copy file name to clipboard+17Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
Collapse file
test/es-module/test-esm-prototype-pollution.mjs
Copy file name to clipboard+15Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
Collapse file
test/parallel/test-primordials-promise.js
Copy file name to clipboardExpand all lines: test/parallel/test-primordials-promise.js+26-3Lines changed: 26 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
18 | 18 | |
19 | 19 | |
20 | 20 | |
21 | | - |
22 | | - |
23 | | - |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
24 | 47 | |
25 | 48 | |
26 | 49 | |
|
0 commit comments