Skip to content

v0.14.6

Latest

Choose a tag to compare

@GitHubNewbie0 GitHubNewbie0 released this 15 Nov 15:38
· 1 commit to main since this release

Security

Document-controlled style values can no longer add CSS declarations in odtToHtml and odsToHtml output. odtToHtml, renderOdtHtml, toHtml(), odsToHtml and renderOdsHtml wrote each style value read from a document into a style attribute with HTML escaping only, which does not cover the ; that separates CSS declarations. A crafted .odt or .ods could therefore end a value such as a color, a font name or a width early and add declarations of its own to that element, such as position: fixed, or a background image loaded from another server. A value could also remove the renderer's own later declarations, or mark itself !important. Each value is now checked before it is written, and one that would not stay exactly one declaration at normal priority is left out: a value holding a top-level ;, { or }, an unclosed string, function, bracket or comment, a malformed string or url(), a trailing backslash, or a trailing !important. The rest of the style attribute is written as before, and the caller is not told when a value is left out. A value that stays one declaration is written unchanged, so the check says nothing about what a value means or what it makes a browser fetch: HTML converted from an untrusted document should still be sanitized or shown in a sandboxed context. Affected from 0.6.0 (odtToHtml) and 0.9.8 (odsToHtml), when each first wrote style attributes.

Also in this release

  • Generated files now declare ODF 1.4 instead of 1.2 (office:version and manifest:version).
  • xlsxToOds no longer writes an empty table:table-row, keeps a merged range whose top-left cell is empty, and no longer moves cells next to or below a merged range.
  • OdsDocument: addRow([]) now writes a valid row, and a value: null cell with a colSpan or rowSpan above 1 is written as an empty spanning cell.

Full details are in the CHANGELOG.

What's Changed

  • deps(deps-dev): bump jest from 30.5.1 to 30.5.2 by @dependabot[bot] in #101
  • deps(deps-dev): bump prettier from 3.9.6 to 3.9.10 by @dependabot[bot] in #100
  • deps(deps): bump marked from 18.0.12 to 18.0.13 by @dependabot[bot] in #98
  • deps(deps-dev): bump vnu-jar from 26.9.7 to 26.9.16 by @dependabot[bot] in #99

Full Changelog: v0.14.5...v0.14.6