summaryrefslogtreecommitdiffstats
path: root/gitweb/gitweb.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-06-06 20:40:22 +0200
committerJunio C Hamano <gitster@pobox.com>2011-06-06 20:40:22 +0200
commit2c6b5d88287689e5a1acd5b5fefb8edd96931b6d (patch)
tree30dc2f979f278c3c5590b8e97d507d66f3e77a31 /gitweb/gitweb.perl
parentMerge branch 'jn/gitweb-docs' (diff)
parentgitweb: Fix usability of $prevent_xss (diff)
downloadgit-2c6b5d88287689e5a1acd5b5fefb8edd96931b6d.tar.xz
git-2c6b5d88287689e5a1acd5b5fefb8edd96931b6d.zip
Merge branch 'jn/mime-type-with-params'
* jn/mime-type-with-params: gitweb: Fix usability of $prevent_xss
Diffstat (limited to 'gitweb/gitweb.perl')
-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,