summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-06-06 11:40:22 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-06-06 11:40:22 -0700
commit2c6b5d88287689e5a1acd5b5fefb8edd96931b6d (patch)
tree30dc2f979f278c3c5590b8e97d507d66f3e77a31
parentMerge branch 'jn/gitweb-docs' (diff)
parentgitweb: Fix usability of $prevent_xss (diff)
downloadtgif-2c6b5d88287689e5a1acd5b5fefb8edd96931b6d.tar.xz
Merge branch 'jn/mime-type-with-params'
* jn/mime-type-with-params: gitweb: Fix usability of $prevent_xss
-rwxr-xr-xgitweb/gitweb.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 240dd4701c..ebf2d1cf2c 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,