Fixed allowed path regex

This commit is contained in:
Michaël Lemaire 2020-05-14 11:29:24 +02:00
parent f29e06254d
commit ba108193ec
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ export async function processRequest(
const file = params.length > 2 ? params.slice(2).join("/") : "all";
const path =
`https://code.thunderk.net/typescript/${lib}/raw/${version}/${file}.ts`;
if (!path.match(/^[a-z0-9\/\.\:-_]+$/)) {
if (!path.match(/^[a-z0-9\/\.\-:_]+$/)) {
return {
status: 400,
body: `console.error("bundler error - Invalid path ${path}");`,