Skip to content

fix: better Jinja2 Chat extension security#11718

Merged
anakin87 merged 2 commits into
mainfrom
chattemplate-nonce
Jun 24, 2026
Merged

fix: better Jinja2 Chat extension security#11718
anakin87 merged 2 commits into
mainfrom
chattemplate-nonce

Conversation

@anakin87

@anakin87 anakin87 commented Jun 22, 2026

Copy link
Copy Markdown
Member

Related Issues

Proposed Changes:

How did you test it?

CI, new tests
(some tests might be redundant but I chose to keep them to avoid future regressions)

Checklist

  • I have read the contributors guidelines and the code of conduct.
  • I have updated the related issue with new insights and changes.
  • I have added unit tests and updated the docstrings.
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I have documented my code.
  • I have added a release note file, following the contributors guidelines.
  • I have run pre-commit hooks and fixed any issue.

@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
haystack-docs Ready Ready Preview, Comment Jun 22, 2026 3:48pm

Request Review

@github-actions github-actions Bot added topic:tests type:documentation Improvements on the docs labels Jun 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  haystack/utils
  jinja2_chat_extension.py 315
Project Total  

This report was generated by python-coverage-comment-action

@anakin87 anakin87 marked this pull request as ready for review June 22, 2026 16:51
@anakin87 anakin87 requested a review from a team as a code owner June 22, 2026 16:51
@anakin87 anakin87 requested review from julian-risch and sjrl and removed request for a team June 22, 2026 16:51
@claude

claude Bot commented Jun 22, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@julian-risch julian-risch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @anakin87 ! Looks good to me. I briefly thought about whether we should handle the removal of START_TAG/END_TAG as a breaking change but I agree there is no good reason to do that. It's a fix that we can roll out in a next minor Haystack 2.x release.

@anakin87 anakin87 merged commit 6958876 into main Jun 24, 2026
28 checks passed
@anakin87 anakin87 deleted the chattemplate-nonce branch June 24, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic:tests type:documentation Improvements on the docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants