diff --git a/lang/en b/lang/en index 88f309c2c..4cc3cf3cd 100644 --- a/lang/en +++ b/lang/en @@ -307,7 +307,6 @@ ui_paging=Showing rows $1 to $2 of $3 ui_rowlabel=$2 in row $1 : ui_filterbox=Type to filter.. ui_of=of -ui_jsblocked=JavaScript was removed to protect your privacy! header_statusmsg=$1 logged into $2 $3 on $4 ($5) diff --git a/updown/fetch.cgi b/updown/fetch.cgi index 0c42790cc..72b014818 100755 --- a/updown/fetch.cgi +++ b/updown/fetch.cgi @@ -94,40 +94,13 @@ if ($ENV{'PATH_INFO'}) { while(read(FILE, $buffer, $bsize)) { if ($dangertypes) { my $buffer_filtered = &filter_javascript($buffer, $pdftype); - # If content was changed upon filtering + # If content was changed upon + # filtering force download it if ($buffer_filtered ne $buffer) { - # For text simply return filtered but - # tell user that it was filtered out - if ($htmltype) { - # Add a banner showing content was changed - my $prefdata = - &ui_alert_box($text{'ui_jsblocked'}, 'danger'); - # Pass filtered content with the banner - # Insert the banner in HTML body - if ($buffer_filtered =~ s/()/$1$prefdata/) { - $fdata = $buffer_filtered; - } - else { - # Insert the banner to the top of HTML doc - $fdata = "$prefdata$buffer_filtered"; - } - # Update content length - $fsize = length($fdata); - } - # For no text files simply force - # download if file was altered - else { - # Force send it - $type = "application/octet-stream"; - print "Content-Disposition: Attachment\n"; - # Pass original content - $fdata = $buffer; - } - } - # Buffere was not changed, just pass it as is - else { - $fdata = $buffer; + $type = "application/octet-stream"; + print "Content-Disposition: Attachment\n"; } + $fdata = $buffer; } else { $fdata .= $buffer;