This commit is contained in:
iliajie
2023-05-18 21:38:22 +03:00
parent 953c4ed020
commit 7b37cedaf6
2 changed files with 3 additions and 1 deletions

View File

@@ -84,7 +84,7 @@ if ($ENV{'PATH_INFO'}) {
print "Content-length: $st[7]\n";
print "X-Content-Type-Options: nosniff\n";
print "Content-type: $type\n\n";
my $dtype = $type =~ /html|xml/i;
my $dtype = $type =~ /html|xml|pdf/i;
my $bsize =
$dtype ? $st[7] : &get_buffer_size_binary();
while(read(FILE, $buffer, $bsize)) {

View File

@@ -9274,6 +9274,8 @@ $rv =~ s/(on(Abort|BeforeUnload|Blur|Change|Click|ContextMenu|Copy|Cut|DblClick|
$rv =~ s/(javascript(:|:|:|:))/x$1/gi;
$rv =~ s/(vbscript(:|:|:|:))/x$1/gi;
$rv =~ s/<([^>]*\s|)(on\S+=)(.*)>/<$1x$2$3>/gi;
$rv =~ s/([\n]*)<<[\n((?:.*?|\n)*?)][\w\s\/]+[\n((?:.*?|\n)*?)][\w\s\/]+JavaScript[\w\s\/]*[\n((?:.*?|\n)*?)][\w\s\/]+\s.*?>>[\n]*/$1/gmsi;
$rv =~ s/<<.*?JavaScript.*?>>([\n]+|[\s]*)//gi;
return $rv;
}