Skip to content

Fix defaultFilter code injection - #269

Merged
bgub merged 1 commit into
masterfrom
bg/fix-default-filter-code-injection
Jun 16, 2026
Merged

Fix defaultFilter code injection#269
bgub merged 1 commit into
masterfrom
bg/fix-default-filter-code-injection

Conversation

@bgub

@bgub bgub commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • serialize defaultFilter with JSON.stringify before embedding it in generated function source
  • update the compile-string expectation for the generated filter lookup
  • add a regression test that malicious defaultFilter text is treated as a filter name and does not execute

Testing

  • npx jest test/compile-string.spec.ts test/filters.spec.ts --runInBand --no-cache
  • npm test -- --runInBand --no-cache
  • npm run lint (passes with existing warnings)

Notes

  • npm run build currently gets through Rollup, then fails in TypeDoc while parsing node_modules/@types/babel__traverse/index.d.ts with the repo's pinned TypeScript 4.0.8.

@bgub
bgub marked this pull request as ready for review June 16, 2026 23:12
@bgub
bgub merged commit c69284e into master Jun 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant