pypi xhtml2pdf 0.2.19
v0.2.19

3 hours ago

🔐 Security

SSRF. <img src="http://169.254.169.254/latest/meta-data/"> returned
cloud instance credentpback, private,
link-local, multicast and reserved addresses are refused by default, on
every hop of a redirec by the address it
resolves to.
**Arbitrary file read.worked; local reads are
now confined to the document's own directory, symlinks and .. included.
**Command injection (Cnger goes through a
shell. It is public API and reachable from the CLI's -d argument.
Two ReDoS. An unclntent:"+ 40 backslashes) cost three minutes of CPU, multiplying by eight every four further characters;< cost 23 seconds per
attribute.
**Decompression bomb.*xpanded to 209 MB
resident. Fetched resources now have a 20 MiB limit, checked against
Content-Length, againd against what it
expands to.
Descriptor leak. Aa deleted-but-open inode
behind for the life of the thread.

🎉 New

The document language reaches the PDF catalog as /Lang, from
<html lang="es-CR"> ` — needed by screen
readers and PDF/UA, and never declared before.
Several tables of contoc name="figures" />plus-pdf-toc-name), each with its own typography. A second pdf:toc`
used to fail the whole
Leader fills between a TOC entry and its page number (-pdf-toc-leader:
dots, dashes, `lin

💪🏼 Performance

The CSS cascade no lery property. Dressing
an element cost O(elements × properties × rules) — 30–48% of a render. 800
elements against 800 r-loremipsum`: 408 ms →
224 ms. Output is unchanged.
An embedded font is once per document.
Across 40 real documents in one process, time inside TTFont went from
3.23s to 0s.

🐛 Bug fixes

A list item whose contps its marker —
<li><p>text</p></li>, which is what rich-text editors emit, silently lost
its bullet.
--start-viewer works on Linux; it had been running the macOS open
everywhere that was no
A TOC lays its page numbers out flush right, links each to its heading, and
indents each level; aneportLab's
Placeholder for table of contents into the document.
getSize no longer waa valid percentage.

What's Changed

New Contributors

Full Changelog: v0.2.17...v0.2.19

Don't miss a new xhtml2pdf release

NewReleases is sending notifications on new releases.