Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.zx2c4.com/cgit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2026-05-04 19:13:13 +0300
committerJason A. Donenfeld <Jason@zx2c4.com>2026-05-04 19:28:27 +0300
commited05b1054df10a2fbc68000cfdd429daec03a456 (patch)
tree21563e3f6537e7db4b26c446edc4d9b1f8cfbccc /cgit.png
parente7e8cf1801b06a9f7f5092671b0413689a765fe7 (diff)
cgit: truncate all config values at the newline
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>
Diffstat (limited to 'cgit.png')
0 files changed, 0 insertions, 0 deletions