We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c61c722 commit 5450e48Copy full SHA for 5450e48
lib/internal/worker.js
@@ -68,11 +68,7 @@ class Worker extends EventEmitter {
68
options.execArgv);
69
}
70
if (!options.eval) {
71
- if (!path.isAbsolute(filename) &&
72
- !filename.startsWith('./') &&
73
- !filename.startsWith('../') &&
74
- !filename.startsWith('.' + path.sep) &&
75
- !filename.startsWith('..' + path.sep)) {
+ if (!path.isAbsolute(filename) && !/^\.\.?[\\/]/.test(filename)) {
76
throw new ERR_WORKER_PATH(filename);
77
78
filename = path.resolve(filename);
0 commit comments