From 46faee559e656881be14c3c9809679756973e664 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Wed, 15 Jul 2026 20:32:24 -1000 Subject: Check max-blob-size up front and default to 10 MB Only the tree view honoured the limit, and only after loading the whole object. The default moves from unlimited to 10 MB so a fresh install never buffers a huge object whole. Zero still turns the limit off. --- 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 2.12.1