Skip to content

Commit

Permalink
fix: check id to prevent xss
Browse files Browse the repository at this point in the history
  • Loading branch information
gnlow committed Dec 29, 2023
1 parent 593fd83 commit d0a9a1b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions api/js.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
cg,
Block,
Project,
idCheck,
} from "../deps/enz.ts"
import JSON5 from "https://esm.sh/json5@2.2.3?pin=v135"

Expand Down Expand Up @@ -32,6 +33,7 @@ class PixiVisitor extends Visitor {
sprite,
objectType,
} = object
idCheck(object.id)
return ``
+ `class Obj_${object.id} extends ${
{
Expand Down
10 changes: 10 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion deps/enz.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "https://deno.land/x/enz@0.1.17/mod.ts"
export * from "https://deno.land/x/enz@0.1.18/mod.ts"

0 comments on commit d0a9a1b

Please sign in to comment.