⬇ Download holy card: ·
Saint Billion Laughs, Who Buried Parsers in Laughter
Patron of XML parsers, entities that multiply, and people who laugh without getting the joke.
Life
In the early 2000s it turned out that a tiny XML document could bring a server to its knees. You define an entity lol worth "lol", then lol2 containing ten of them, lol3 containing ten lol2s, and so on up to lol9: a few bytes that, once expanded, become a billion laughs and gigabytes of memory. It hit libxml2 and many others, and ever since every serious parser carries a limit on expansions.
Prayer
O Saint Billion Laughs, who fills all of RAM with ten lines, set a limit on our entities and a brake on our laughter. Amen.
How to celebrate
Celebrated by disabling DTDs where they are not needed, capping entity expansion, and telling a joke just once.
He who laughs last laughs best, but the parser never gets to the end.