Merge branch 'jn/mime-type-with-params'

* jn/mime-type-with-params:
  gitweb: Fix usability of $prevent_xss
This commit is contained in:
Junio C Hamano 2011-06-06 11:40:22 -07:00
Родитель eca4f3b1af bee6ea17a1
Коммит 2c6b5d8828
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -6127,7 +6127,7 @@ sub git_blob_plain {
# want to be sure not to break that by serving the image as an # want to be sure not to break that by serving the image as an
# attachment (though Firefox 3 doesn't seem to care). # attachment (though Firefox 3 doesn't seem to care).
my $sandbox = $prevent_xss && my $sandbox = $prevent_xss &&
$type !~ m!^(?:text/plain|image/(?:gif|png|jpeg))$!; $type !~ m!^(?:text/plain|image/(?:gif|png|jpeg))(?:[ ;]|$)!;
print $cgi->header( print $cgi->header(
-type => $type, -type => $type,