From e5587d89796b51a8226fb00a225b1006e406f659 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Wed, 15 Jul 2026 16:11:30 -1000 Subject: Check `max-blob-size` before reading, default 10 MB Only the tree view honoured the limit, and only after loading the whole object. The raw blob, plain, blame and readme paths now check the size before reading, and the default moves from unlimited to 10 MB so a fresh install never buffers a huge object whole, with zero still the opt-out. --- cgitrc.5.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cgitrc.5.txt') diff --git a/cgitrc.5.txt b/cgitrc.5.txt index b5315cc..b15505f 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt @@ -283,8 +283,10 @@ max-atom-items:: value: "10". max-blob-size:: - Specifies the maximum size of a blob to display HTML for in KBytes. - Default value: "0" (limit disabled). + Specifies the maximum size in KBytes of a blob that cgit will read into + memory to serve. It caps both the HTML blob view and the raw "plain" and + "blob" output, and a larger object is refused rather than loaded whole. + Default value: "10240" (10 MB). Set to "0" to disable the limit. max-commit-count:: Specifies the number of entries to list per page in "log" view. Default -- cgit v2.8.0