aboutsummaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-06-06 11:40:22 -0700
committerJunio C Hamano <gitster@pobox.com>2011-06-06 11:40:22 -0700
commit2c6b5d88287689e5a1acd5b5fefb8edd96931b6d (patch)
tree30dc2f979f278c3c5590b8e97d507d66f3e77a31 /gitweb
parenteca4f3b1af1d4ffe27aba65b1abb24df487eaf38 (diff)
parentbee6ea17a1bab824eba6133eefc3c70b219ec98c (diff)
downloadgit-2c6b5d88287689e5a1acd5b5fefb8edd96931b6d.tar.gz
git-2c6b5d88287689e5a1acd5b5fefb8edd96931b6d.tar.xz
Merge branch 'jn/mime-type-with-params'
* jn/mime-type-with-params: gitweb: Fix usability of $prevent_xss
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 240dd4701..ebf2d1cf2 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -6127,7 +6127,7 @@ sub git_blob_plain {
# want to be sure not to break that by serving the image as an
# attachment (though Firefox 3 doesn't seem to care).
my $sandbox = $prevent_xss &&
- $type !~ m!^(?:text/plain|image/(?:gif|png|jpeg))$!;
+ $type !~ m!^(?:text/plain|image/(?:gif|png|jpeg))(?:[ ;]|$)!;
print $cgi->header(
-type => $type,