Fixing security bug
This commit is contained in:
@ -372,7 +372,9 @@ export class TypescriptTarget extends CompileTarget {
|
||||
a(2, `if(Array.isArray(params)){`);
|
||||
a(3, `p = params;`);
|
||||
a(3, `while(p.length < ${fnc.inputs.length})`);
|
||||
a(4, `p.push(undefined)`);
|
||||
a(4, `p.push(undefined);`);
|
||||
a(3, `if(p.length > ${fnc.inputs.length})`);
|
||||
a(4, `throw new Error("Too many parameters!");`);
|
||||
a(2, `} else {`);
|
||||
for (const param of fnc.inputs) {
|
||||
a(3, `p.push(params["${param.name}"])`);
|
||||
|
Reference in New Issue
Block a user