Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: html encode backslashes if used with escape filter or autoescape #1437

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

fdintino
Copy link
Collaborator

Backslashes should be html encoded when present in expressions that are passed to the escape filter (including when this happens automatically with autoescape)

Backslashes should be html encoded when present in expressions that are
passed to the escape filter (including when this happens automatically
with autoescape)
@codecov
Copy link

codecov bot commented Apr 12, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (fd50090) 89.65% compared to head (833797a) 89.65%.

❗ Current head 833797a differs from pull request most recent head 5ea30b5. Consider uploading reports for the commit 5ea30b5 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1437   +/-   ##
=======================================
  Coverage   89.65%   89.65%           
=======================================
  Files          22       22           
  Lines        3046     3046           
=======================================
  Hits         2731     2731           
  Misses        315      315           
Impacted Files Coverage Δ
nunjucks/src/lib.js 86.54% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@fdintino fdintino merged commit ec16d21 into master Apr 12, 2023
@fdintino fdintino deleted the fix/escape-backslashes branch April 12, 2023 18:32
valtlai added a commit to valtlai/nunjucks-deno that referenced this pull request Apr 13, 2023
…mozilla/nunjucks#1437)

Backslashes should be html encoded when present in expressions that are
passed to the escape filter (including when this happens automatically
with autoescape)

---

Ported from mozilla/nunjucks@ec16d21

Co-Authored-By: Frankie Dintino <[email protected]>
valtlai added a commit to valtlai/nunjucks-deno that referenced this pull request Apr 13, 2023
…mozilla/nunjucks#1437)

Backslashes should be html encoded when present in expressions that are
passed to the escape filter (including when this happens automatically
with autoescape)

---

Ported from mozilla/nunjucks@ec16d21

Co-Authored-By: Frankie Dintino <[email protected]>
otc-zuul bot pushed a commit to opentelekomcloud-infra/backstage that referenced this pull request May 9, 2023
Bump nunjucks from 3.2.3 to 3.2.4

Bumps nunjucks from 3.2.3 to 3.2.4.

Release notes
Sourced from nunjucks's releases.

v3.2.4
What's Changed

fix: html encode backslashes if used with escape filter or autoescape by @​fdintino in mozilla/nunjucks#1437. Fixes CVE-2023-2142
 ([bugzilla #1825980](https://bugzilla.mozilla.org/show_bug.cgi?id=1825980))

Full Changelog: mozilla/[email protected]



Changelog
Sourced from nunjucks's changelog.

3.2.4 (Apr 13 2023)

HTML encode backslashes when expressions are passed through the escape
filter (including when this is done automatically with autoescape). Merge
of #1437.




Commits

86a77f4 Release v3.2.4
ec16d21 fix: html encode backslashes if used with escape filter or autoescape (#1437)
See full diff in compare view




Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

@dependabot rebase will rebase this PR
@dependabot recreate will recreate this PR, overwriting any edits that have been made to it
@dependabot merge will merge this PR after your CI passes on it
@dependabot squash and merge will squash and merge this PR after your CI passes on it
@dependabot cancel merge will cancel a previously requested merge and block automerging
@dependabot reopen will reopen this PR if it is closed
@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the Security Alerts page.

Reviewed-by: Artem Goncharov
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