AgeCommit message (Collapse)AuthorLines
Pass over a notes ref that names no treeBryce Kwon-3/+14
A pusher can point refs/notes/commits or a signature notes ref at any object, and git dies loading one that is no tree, which ended every page of the repository, the dumb transport included. Such a ref now counts as absent.
Keep string literals behind const pointersBryce Kwon-1/+1
Git's DEVELOPER=1 build turns on -Wwrite-strings as an error, and the literals stored through plain char pointers failed cgit's own objects there. The exec filter's argv takes the cast execvp needs once, the way git's run-command does.
Remove what the version removal left behindBryce Kwon-2/+0
Cache every branch page under cache-dynamic-ttlBryce Kwon-7/+2
The dynamic ttl only applied when the url named a branch with h=, so the log, tree and refs of the default branch, which never carry one, fell back to cache-summary-ttl. The manual already gives each ttl the scope the code now uses.
Gate a readme ending in a colon like a disk pathBryce Kwon-4/+2
trust-scan-config passed any readme holding a colon as a tracked file, while the parser takes one only when a path follows the colon, so a scanned repository could still name a file on disk outside itself. The two now share one test.
End a request quietly when the client has goneBryce Kwon-1/+3
A write that failed with EPIPE on an uncached page died into an error page, which died again at exit when the page could not be sent either, and git logged a recursion warning on every dropped connection. A filter that exits early fails a write the same way, so the quiet exit is kept for writes that reach the client itself.
Keep clone files and oversized responses out of the cacheBryce Kwon-1/+19
The dumb transport reads files that already sit on the disk, so a pack copied into a slot cost that disk twice and the request a second write of every byte. A snapshot took a slot whatever its size, so a visitor naming distinct refs and ids could fill the cache root with archives. `cache-max-slot-size`, 64 MB unless set, now serves a larger response from the lock file and drops it, along with any expired copy it would have replaced.
Rename enable-trailers to enable-commit-trailersBryce Kwon-5/+5
Align with spaces instead of tabsBryce Kwon-13/+12
Harden the request path, scan and error recoveryBryce Kwon-52/+125
Answer 404 for a repository whose path is missingBryce Kwon-6/+8
Gate scanned filters with `trust-scan-filters`Bryce Kwon-22/+13
Apply the mailmap at HEAD to every identBryce Kwon-0/+6
Split trailers out of the commit messageBryce Kwon-2/+14
Clean up the whole treeBryce Kwon-56/+47
Trim the comments and dead code across the treeBryce Kwon-54/+37
Report ignored config keys on stderrBryce Kwon-4/+12
Rename the inconsistent config keysBryce Kwon-23/+25
noplainemail enable-plain-email noheader enable-header cache-root-ttl cache-index-ttl cache-repo-ttl cache-summary-ttl cache-scanrc-ttl cache-scan-ttl agefile age-file renamelimit rename-limit extra-head-content head-content
Fold `enable-stats` back into `max-stats`Bryce Kwon-6/+0
A `max-stats` period enables the page again, as it did before v2.2.0, so one key does both jobs.
Use standard HTTP reason phrasesBryce Kwon-5/+5
Resolve submodule links from `.gitmodules`Bryce Kwon-0/+5
Log scan lock failures that are not contentionBryce Kwon-1/+6
Give up a scan or slot whose lock file was renamedBryce Kwon-0/+13
Let a crashed scan's lock expire with its processBryce Kwon-9/+40
Cache id-pinned pages and snapshots as staticBryce Kwon-3/+27
Keep error pages out of the cacheBryce Kwon-3/+2
Drop the Last-Modified, Expires and ETag headersBryce Kwon-11/+0
Remove the repository homepage featureBryce Kwon-4/+0
Restyle the sources and fix the audit's findingsBryce Kwon-843/+918
Bound the search and cache key a request can askBryce Kwon-1/+8
Gather page output into one bufferBryce Kwon-0/+3
Settle the names, types and layout of the sourcesBryce Kwon-59/+59
Isolate the git environment without a constructorBryce Kwon-8/+13
Update the bundled Git to 2.55.0Bryce Kwon-1/+1
Give empty repositories their own pageBryce Kwon-18/+7
Add `enable-relative-dates` and `date-format`Bryce Kwon-0/+6
Drop the help tab and its built-in guideBryce Kwon-3/+0
Replace the browser markdown renderer with a filterBryce Kwon-3/+0
The readme is now escaped plain text unless `about-filter` points at the new `about-render.lua`, which renders markdown, man pages and plain text server-side. `enable-markdown` goes away with the renderer.
Add `max-patch-count` to bound the patch viewBryce Kwon-0/+3
Gate the stats page and add a language breakdownBryce Kwon-0/+6
`max-stats` only bounds the selectable periods now and no longer doubles as the enable switch. The tree walk runs before the history walk on purpose. Releasing commit memory while walking history resets each commit slab index, and a commit graph lookup afterwards would read another commit slot and walk the wrong tree. The stats fixture writes a commit graph so the tests cover that path. The history walk bounds the window in process rather than passing a formatted since date to `setup_revisions`, and parses each commit once.
Remove the owner filter hookBryce Kwon-6/+0
Stat oversized diffs instead of inlining themBryce Kwon-0/+6
Cap and paginate the ref listingsBryce Kwon-0/+3
Add a help page with common workflowsBryce Kwon-0/+3
Point the fork's links and credits at itselfBryce Kwon-2/+2
AUTHORS now records the upstream developers as the project's history rather than as maintainers of the fork.
Drop unused config and query fieldsBryce Kwon-4/+0
Key the cache on scheme and hostBryce Kwon-2/+15
Clone urls and atom links are built from the request scheme and Host, but the cache key left them out, so a request with a spoofed Host could cache a page carrying a bogus clone url and serve it to other visitors.
Bound the authenticate-post length safelyBryce Kwon-3/+4
The POST length was clamped with a signed comparison, so a very large Content-Length could turn negative and slip past the limit into the fixed-size buffer.
Respect the cgitrc order of sectionsBryce Kwon-1/+1
The default sorted the sections and the repositories within them by name, so the order written in the cgitrc file was ignored.
Keep snapshots working under a global git configBryce Kwon-1/+7
cgit unsets HOME to isolate git from the calling user, but git still finds the global config through its getpwuid fallback and then dies expanding a `~` in `core.excludesfile`. That die happened after the snapshot headers and the gzip filter were already in place, so the error page was compressed into the archive and every snapshot came out undecompressable.