=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 4.4 retrieving revision 4.12 diff -u -p -r4.4 -r4.12 --- cvsweb/cvsweb.cgi 2019/11/09 09:19:27 4.4 +++ cvsweb/cvsweb.cgi 2019/11/10 14:55:42 4.12 @@ -1,5 +1,5 @@ -#!/usr/bin/perl -T -# $Id: cvsweb.cgi,v 4.4 2019/11/09 09:19:27 schwarze Exp $ +#!/usr/bin/perl +# $Id: cvsweb.cgi,v 4.12 2019/11/10 14:55:42 schwarze Exp $ # $knu: cvsweb.cgi,v 1.299 2010/11/13 16:37:18 simon # # cvsweb - a CGI interface to CVS trees. @@ -50,7 +50,6 @@ require 5.006; use strict; - use warnings; use filetest qw(access); @@ -114,7 +113,7 @@ use constant HAS_EDIFF => eval { require String::Ed BEGIN { - $VERSION = '3.0.6'; + $VERSION = '3.1'; $HTML_DOCTYPE = '/>/g; return $_; @@ -4234,6 +4243,8 @@ sub http_header(;$$) push(@headers, 'Last-Modified: ' . scalar gmtime($moddate) . ' GMT') if $moddate; push(@headers, 'Content-Type: ' . $content_type); + push(@headers, "Content-Security-Policy: default-src 'none'; " . + "img-src 'self'; style-src 'unsafe-inline'"); if ($allow_compress && $maycompress) { if (HAS_ZLIB @@ -4426,7 +4437,7 @@ sub TIEHANDLE crc => 0, len => 0, }; - my ($header) = pack("c10", + my ($header) = pack("C10", MAGIC1, MAGIC2, Compress::Zlib::Z_DEFLATED(), 0, 0, 0, 0, 0, 0, OSCODE); print {$o->{handle}} $header;