Fixed allowed path regex
This commit is contained in:
parent
f29e06254d
commit
ba108193ec
1 changed files with 1 additions and 1 deletions
|
@ -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}");`,
|
||||
|
|
Loading…
Reference in a new issue