diff options
Diffstat (limited to 'lib/base-compiler.js')
-rw-r--r-- | lib/base-compiler.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/base-compiler.js b/lib/base-compiler.js index 172c012ea..25bd3c0eb 100644 --- a/lib/base-compiler.js +++ b/lib/base-compiler.js @@ -1817,7 +1817,7 @@ but nothing was dumped. Possible causes are: // to simple attempts with a clear diagnostic; the service still needs to // assume that malicious actors can make the compiler open arbitrary files. checkSource(source) { - const re = /^\s*#\s*i(nclude|mport)(_next)?\s+["<](\/|.*\.\.)[">]/; + const re = /^\s*#\s*i(nclude|mport)(_next)?\s+["<]((\.{1,2}|\/)[^">]*)[">]/; const failed = []; for (const [index, line] of utils.splitLines(source).entries()) { if (re.test(line)) { |