| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
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
|
|
A `max-stats` period enables the page again, as it did before
v2.2.0, so one key does both jobs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
`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.
|
|
|
|
|
|
|
|
|
|
AUTHORS now records the upstream developers as the project's history
rather than as maintainers of the fork.
|
|
|
|
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.
|
|
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.
|
|
The default sorted the sections and the repositories within them by
name, so the order written in the cgitrc file was ignored.
|
|
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.
|
|
A crafted `ofs` could send cgit walking most of the history for one
request.
|
|
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.
|
|
cgit had no markdown support of its own, so a readme was rendered
through an external python filter or not at all. Escaping the source
and formatting it in cgit.js keeps the work in the browser like the
blob highlighter, and the page stays readable as plain text without
scripting.
|
|
|
|
The `ls_cache` page printed the cache directory path and the urls other
visitors had requested, with no gate at all.
|
|
The C sources move to source/, the served files to assets/, the bundled
Git submodule to libraries/git and the filter scripts to extensions/.
Everything the build generates now lands in build/, so a clean is a
single remove and the tree stays clean.
|
|
These would be largely invalid anyway (save, I suppose, for Linux file
paths that technically can contain new lines).
The actual problem is that these get printed back out into cached -- and
trusted -- cgitrc files, and if the fields have newlines, the git-config
way of less trusted users configuring repos on a shared system can be
abused to inject newlines, which then can be used to smuggle global
options (including filters, which execute code) into the cached cgitrc.
So now, only ever duplicate up to the newline, when dealing with these
inputs.
Reported-by: Adrian Denkiewicz <adrian@doyensec.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
There's no reason to pass around function pointers. It was never used
for anything beyond one function.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
We don't get any return value from compile_grep_patterns calling
compile_regexp_failed, causing the default die routine to print to
stderr and then for cgit to exit ungracefully.
Instead override the default die routine to show a normal error page.
Perhaps compile_grep_patterns ought to change upstream to return an
error. But this commit here will handle future issues as well, so
perhaps not a bad idea to do anyway.
Link: https://lists.zx2c4.com/pipermail/cgit/2026-March/004982.html
Link: https://lists.zx2c4.com/pipermail/cgit/2026-March/004983.html
Reported-by: Adrian C. <anrxc@sysphere.org>
Reported-by: Aiden Woodruff <aiden@aidenw.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
This exists for other CPU heavy operations like blame, but doesn't for
the follow functionality. Add it for that.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
Update to git version v2.53.0, this requires changes for these
upstream commits:
* bdbebe5714b25dc9d215b48efbb80f410925d7dd
refs: introduce wrapper struct for `each_ref_fn`
* 589127caa73090040200989ff4d24c3d54f473f2
packfile: move list of packs into the packfile store
* 5a5c7359f77ecd1bc4b0e172563161d602f131d3
refs: drop `current_ref_iter` hack
* b6e4cc8c32850315323961659e553d1d14591f7f
tag: support arbitrary repositories in parse_tag()
* 84f0e60b28de69d1ccb7a51b729af6202b6cf4c8
packfile: move packfile store into object source
Signed-off-by: Christian Hesse <mail@eworm.de>
|
|
Update to git version v2.47.0, this requires changes for these
upstream commits:
* e8207717f1623325fe1c95338fb03c1104ed5687
refs: add referent to each_ref_fn
Signed-off-by: Christian Hesse <mail@eworm.de>
|
|
Update to git version v2.46.0, this requires changes for these
upstream commits:
* e7da9385708accf518a80a1e17969020fb361048
global: introduce `USE_THE_REPOSITORY_VARIABLE` macro
* 9da95bda74cf10e1475384a71fd20914c3b99784
hash: require hash algorithm in `oidread()` and `oidclr()`
* 30aaff437fddd889ba429b50b96ea4c151c502c5
refs: pass repo when peeling objects
* c8f815c2083c4b340d4148a15d45c55f2fcc7d3f
refs: remove functions without ref store
Signed-off-by: Christian Hesse <mail@eworm.de>
|