]> Lady’s Gitweb - Gitweb/commit
gitweb: add $prevent_xss option to prevent XSS by repository content
authorMatt McCutchen <redacted>
Sun, 8 Feb 2009 00:00:09 +0000 (19:00 -0500)
committerLady <redacted>
Mon, 6 Apr 2026 04:50:38 +0000 (00:50 -0400)
commit2ea1d67c50c405bb76e471563bf87ed8643aa905469e8c8c9630b81d5eea0d24
tree0fff7e66a9c7397df04b70ecd08ed152b44d52e3bdce4bc5fc31cbf50df7e326
parentbb9db3a422e701cef902d1018a4ad87102f4711080b7e323995fdd9802d60884
gitweb: add $prevent_xss option to prevent XSS by repository content

Add a gitweb configuration variable $prevent_xss that disables features
to prevent content in repositories from launching cross-site scripting
(XSS) attacks in the gitweb domain.  Currently, this option makes gitweb
ignore README.html (a better solution may be worked out in the future)
and serve a blob_plain file of an untrusted type with
"Content-Disposition: attachment", which tells the browser not to show
the file at its original URL.

The XSS prevention is currently off by default.

Signed-off-by: Matt McCutchen <redacted>
Signed-off-by: Junio C Hamano <redacted>
README
gitweb.perl
This page took 0.240294 seconds and 4 git commands to generate.