OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-web Date: 05-Apr-2004 15:37:30
Branch: HEAD Handle: 2004040514373000
Modified files:
openpkg-web/security page.pl
Log:
avoid files being incorrectly identified as signed; put note on
invalid signatures
Summary:
Revision Changes Path
1.37 +19 -3 openpkg-web/security/page.pl
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-web/security/page.pl
============================================================================
$ cvs diff -u -r1.36 -r1.37 page.pl
--- openpkg-web/security/page.pl 8 Jan 2004 15:29:40 -0000 1.36
+++ openpkg-web/security/page.pl 5 Apr 2004 13:37:30 -0000 1.37
@@ -23,7 +23,7 @@
foreach my $sa (@SA) {
$sa =~ s|\.txt$||s;
- print "$sa\n";
+ print "$sa";
my $io = new IO::File "<$sa.txt" or die;
my $txt = '';
$txt .= $_ while (<$io>);
@@ -55,8 +55,24 @@
$head =~ s|[EMAIL PROTECTED]@|$sidebar|s;
my $hint = '';
- if ($txt !~ m|^-----BEGIN PGP SIGNED MESSAGE-----|) {
- $hint = "<center><font color=\"#cc3333\" size=+4><b>*** DRAFT
***</b></font></center>\n";
+ if ( system("gpg --verify $sa.txt >/dev/null 2>&1") != 0 ) {
+ if ($txt !~ m|^-----BEGIN PGP SIGNED MESSAGE-----|) {
+ $hint .= "<center>\n";
+ $hint .= "<font color=\"#cc3333\" size=+4><b>*** DRAFT
***</b></font>\n";
+ $hint .= "<br>Please review. History of this document can be found in
<a href=\"http://cvs.openpkg.org/rlog?f=openpkg-web/security/$sa.txt\">CVS</a>\n";
+ $hint .= "</center>\n";
+ print " DRAFT\n";
+ }
+ else {
+ $hint .= "<center>\n";
+ $hint .= "<font color=\"#cc3333\" size=+4><b>*** INVALID SIGNATURE
***</b></font>\n";
+ $hint .= "<br>Please review! History of this document can be found in
<a href=\"http://cvs.openpkg.org/rlog?f=openpkg-web/security/$sa.txt\">CVS</a>\n";
+ $hint .= "</center>\n";
+ print " INVALID SIGNATURE\n";
+ }
+ }
+ else {
+ print " ok\n";
}
my $out = $head .
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]