Website Summary Files Commits Branches @commit @diff @stats
path: root / ui-commit.h
diff options
context:
space:
mode:
Commited05b1054df10a2fbc68000cfdd429daec03a456 (patch)
Author
 Jason A. Donenfeld <Jason@zx2c4.com>
2026-05-04 18:13:13 +0200
Committer
 Jason A. Donenfeld <Jason@zx2c4.com>
2026-05-04 18:28:27 +0200
Files21563e3f6537e7db4b26c446edc4d9b1f8cfbccc /ui-commit.h
cgit-ed05b1054df10a2fbc68000cfdd429daec03a456.tar
cgit-ed05b1054df10a2fbc68000cfdd429daec03a456.tar.gz
cgit-ed05b1054df10a2fbc68000cfdd429daec03a456.zip
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>
0 files changed, 0 insertions, 0 deletions