Reference
Limits and safety
How Fetlar protects you from hostile files, and the limits it applies.
Office files from the internet are untrusted. Fetlar is built to read them safely.
How files are read
- XML is parsed without DTDs or entity expansion.
- The number of zip parts and their expanded size are checked before anything is read.
- Cells, slides, sheets and nesting depth are capped. Very deep nesting is read as plain text instead of recursing.
- Damaged zip files are recovered from their local headers, as Word and LibreOffice do.
- Fetlar is fuzz-tested on mutated real-world files.
- Macros are never run. Fields and links in files you read are never followed.
- Fetlar works offline. It does not open network connections to read a file.
A file that crashes Fetlar, hangs it, or makes it use too much memory is a security bug.
Limits
| What | Limit |
|---|---|
| Excel cells read | 2,000,000 non-empty cells. Change with --max-cells. The cut is reported |
| Time | none by default. --timeout SECS gives up with exit code 75 |
| Files over a safety limit (expanded size, number of parts) | refused, exit code 75 |
| Template placeholders | 400,000 |
| Template XML elements | 12 million |
| Template compiled output | 384 MB |
| Template blocks per part | 200,000 |
| XML in a template | 256 MB in all |
| Block nesting | 64 deep |
| Loop iterations | 20 million |
| Fill output | 2 GB |
| One value | 1 million characters |
| One picture | 10 MB |
| Excel loop | a loop that would pass row 1,048,576 is refused (exit code 75) |
| Index: time per file | 120 seconds. Change with --timeout |
| Index: file size | 200 MB. Change with --max-mb |
| Index: memory | about 1 GB of file data at once, whatever the number of threads |
| Word table width on export | Word's 63 columns, wider tables are split |
MCP limits are in Environment variables.
Threads and memory
FETLAR_THREADS=1 uses the least memory. On an ordinary file Fetlar uses about 5 MB.
What is left out of reading
Hidden text, text smaller than 2 pt, deleted tracked changes, comments, hidden sheets, rows, columns and slides. See Reading files.
Reporting a problem
Report security problems privately, not in a public place. Include the file, or a description of how to build one.