Skip to content

Commit 2c6b5d8

Browse files
committed
Merge branch 'jn/mime-type-with-params'
* jn/mime-type-with-params: gitweb: Fix usability of $prevent_xss
2 parents eca4f3b + bee6ea1 commit 2c6b5d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitweb/gitweb.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6127,7 +6127,7 @@ sub git_blob_plain {
61276127
# want to be sure not to break that by serving the image as an
61286128
# attachment (though Firefox 3 doesn't seem to care).
61296129
my $sandbox = $prevent_xss &&
6130-
$type !~ m!^(?:text/plain|image/(?:gif|png|jpeg))$!;
6130+
$type !~ m!^(?:text/plain|image/(?:gif|png|jpeg))(?:[ ;]|$)!;
61316131

61326132
print $cgi->header(
61336133
-type => $type,

0 commit comments

Comments
 (0)