add sanity check on scm_url
authorAndrew Dunstan <andrew@dunslane.net>
Wed, 23 Jan 2013 15:51:35 +0000 (07:51 -0800)
committerAndrew Dunstan <andrew@dunslane.net>
Wed, 23 Jan 2013 15:51:35 +0000 (07:51 -0800)
cgi-bin/show_log.pl

index 22df73144db1911a26970c8ccdc73c440fe3c274..7fea634bad0a3aef839a78217ce58c53aaf6a10f 100755 (executable)
@@ -107,6 +107,7 @@ if ($system && $logdate)
        $scm = $row->[7];
        $scm ||= 'cvs'; # legacy scripts
        $scmurl = $row->[8];
+       $scmurl = undef unless $scmurl =~ /^http/; # slight sanity check
        $scmurl = 'http://git.postgresql.org/gitweb?p=postgresql.git;a=commit;h=' 
            if ($scmurl eq 'http://git.postgresql.org/git/postgresql.git');
        $log_file_names =~ s/^\{(.*)\}$/$1/;