
Stopping the Billion Laughs Attack in Your XML Parser
A 547-byte file that expands to 30 million characters. How lxml, ElementTree and Java refused it, what the limits are, and the settings that keep them on.
Everything you need to level up your coding skills.

A 547-byte file that expands to 30 million characters. How lxml, ElementTree and Java refused it, what the limits are, and the settings that keep them on.

Join two CSV files on a key with plain SQL in DuckDB. Covers a 2M by 250k row join, keys that differ by case and spaces, left and anti joins, and type errors.

Excel says the file format or extension is not valid when the content does not match the extension. Identify the real format from its first bytes and fix it.

One COPY statement turns a CSV into Parquet in DuckDB. See the schema it writes, fix zip and money columns, compare compression codecs, and verify the result.

An XXE attack makes a parser read a file or fetch a URL the sender names. Run on five parsers, three leaked a local file by default or with one flag.

JSON_TABLE in MySQL 8 turns JSON arrays into typed rows. Syntax, nested paths, default and error clauses, the silent NULLs, and timings on 250,000 items.

Use ignore_errors and store_rejects in DuckDB to read past bad CSV rows, then query reject_errors to see which lines were dropped and why.

Write a JSON Schema for a YAML config, run check-jsonschema in CI, get every error with a path, and know that the loader decides what NO and 3.10 are.

What #REF!, #NAME? and #VALUE! mean when a script writes the formulas, with the usual causes, how to find the cell and the fixes in openpyxl and Excel.

A date column with five formats makes DuckDB fall back to text. Parse it with try_strptime and coalesce, list the failures, and avoid the day-first trap.

The XML attacks that matter for web services and loaders, how six parsers behave, one parse function with limits, and the tests that keep it closed.

A map of Excel errors seen when scripts write or read workbooks: file and format messages, cell error codes, library exceptions and a debugging order.
We send one email when a new article is published. No spam.