Skip to content

Commit

Permalink
fix: Polynomial regular expression used on uncontrolled data #316
Browse files Browse the repository at this point in the history
  • Loading branch information
TBXark committed Dec 16, 2024
1 parent 36b3dfe commit a06586a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/buildinfo.json

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

8 changes: 4 additions & 4 deletions dist/index.js

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

4 changes: 2 additions & 2 deletions packages/lib/core/src/config/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const BUILD_TIMESTAMP = 1734333128;
export const BUILD_VERSION = 'b238758';
export const BUILD_TIMESTAMP = 1734333416;
export const BUILD_VERSION = '36b3dfe';
4 changes: 2 additions & 2 deletions packages/lib/plugins/src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ export function formatInput(input: string, type: TemplateInputType): string | st
if (type === 'json') {
return JSON.parse(input);
} else if (type === 'space-separated') {
return input.split(/\s+/);
return input.trim().split(' ').filter(Boolean);
} else if (type === 'comma-separated') {
return input.split(/\s*,\s*/);
return input.split(',').map(item => item.trim()).filter(Boolean);
} else {
return input;
}
Expand Down

0 comments on commit a06586a

Please sign in to comment.