Repository navigation
A 1.2 patch release with a security fix; upgrading from 1.2.5 is recommended.
Security
-
Theming component tags now escape plain-string arguments. Every
slot_*argument of thetheme_*component and page tags, and the inline arguments that fill a slot (a card'sbody, an alert's message), plus thecontentof atheme_tabsdict were inserted into the page as HTML. They are now autoescaped like{{ variable }}. Values that are already safe still render as HTML:mark_safeandformat_htmloutput, and string literals written in the template itself.{% djust_sw_register %}now encodessw_urlandscopeso that neither can end the inline script, and it escapes its CSP nonce attribute. TheMarkdownTextareapreview strips control and whitespace characters before it checks a link's scheme, and then accepts onlyhttp,https,mailtoand relative targets.Compatibility: an app that passed HTML to one of these arguments as a plain string from Python now sees that markup as escaped text. Examples are
body="<p>…</p>"and tabcontentbuilt from markup. Useformat_htmlwhen the markup interpolates values, ormark_safefor constant markup. Never mark user-supplied text safe.
What's Changed
- release: 1.2.6 by @johnrtipton in #3493
- security(deps): bump mcp to 1.30.0 in uv.lock (1.2) by @johnrtipton in #3497
Full Changelog: v1.2.5...v1.2.6