mirror of
https://github.com/git/git
synced 2024-08-25 10:45:59 +00:00
Merge branch 'jn/mime-type-with-params'
* jn/mime-type-with-params: gitweb: Fix usability of $prevent_xss
This commit is contained in:
commit
2c6b5d8828
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue