X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=t-prot;h=446c0eb15c7e8151f668f69ebff319d676d16e40;hb=8af23c653bc27cbfa95c03fec9cba3032c660418;hp=199daba5b45480da9bd5fd94ccbb04363b3a1d8d;hpb=8e56a4fc26c4f805286ad5c62157cafbe37acc58;p=pkg%2Ft-prot.git diff --git a/t-prot b/t-prot index 199daba..446c0eb 100755 --- a/t-prot +++ b/t-prot @@ -1,13 +1,13 @@ #!/usr/bin/perl -w -# $Id: t-prot,v 1.222 2005/02/14 14:19:14 jochen Exp $ +# $Id: t-prot,v 1.227 2005/03/01 15:20:49 jochen Exp $ require 5.006; use strict; use Fcntl qw(O_EXCL O_WRONLY O_CREAT); use Getopt::Mixed qw(nextOption); -use constant VER => '1.96'; +use constant VER => '1.98'; use constant REV => ''; -use constant REL => q$Revision: 1.222 $=~m/(\d+(?:\.\d+)+)/; +use constant REL => q$Revision: 1.227 $=~m/(\d+(?:\.\d+)+)/; # MTA expecting mail on STDIN # (you might have to adjust this if using a different MTA) use constant SENDMAIL => '/usr/sbin/sendmail -oi'; @@ -143,9 +143,6 @@ sub sigint_handler { $sigint = 1; } -# esc(): escapes a scalar reference for use in perl regexp -sub esc { ${$_[0]} =~ s/([\[\]\(\)\*\.\-\^\$\@])/\\$1/go; } - # remove_footers(): remove any trailing appearance of footers contained # in the given directory. sub remove_footers { @@ -310,11 +307,11 @@ sub pgp { my $ok = 0; while ($X<$Z) { - if ($$L[$X] =~ /^gpg:\s(?:$gpg_WARNING|$gpg_Warning|$gpg_bad|$gpg_Cantcheck|$gpg_expired)/o) + if ($$L[$X] =~ /^gpg:\s(?:\Q$gpg_WARNING\E|\Q$gpg_Warning\E|\Q$gpg_bad\E|\Q$gpg_Cantcheck\E|\Q$gpg_expired\E)/o) { return 0; } - if ($$L[$X] =~ /^gpg:\s$gpg_bug/o) + if ($$L[$X] =~ /^gpg:\s\Q$gpg_bug/o) { return 0; } - if ($$L[$X] =~ /^gpg:\s$gpg_good/o) + if ($$L[$X] =~ /^gpg:\s\Q$gpg_good/o) { $ok = 1; } $X++; } @@ -332,7 +329,7 @@ sub pgp { for (my $x=0; $x1 && - $$L[$i] =~ /^gpg:\s$gpg_aka/o && $$L[$i] !~ /$from/) + $$L[$i] =~ /^gpg:\s\Q$gpg_aka/o && $$L[$i] !~ /\Q$from/) { splice(@$L, $i, 1); splice(@$V, $i, 1); $i--; } - elsif ($$L[$i]=~/^(?:\e.+?\a)?(?:$mutt_pgpoutend)/o) + elsif ($$L[$i]=~/^(?:\e.+?\a)?(?:\Q$mutt_pgpoutend\E)/o) { if ($pgpmove || ($pgpmovevrf && (!$sigint) && verified($L, $x+1, $i))) @@ -374,7 +370,7 @@ sub pgp { } } elsif ($tmp && - $$L[$x]=~/^(?:\e.+?\a)?(?:$mutt_pgpencrypted|$mutt_pgpclearsigned|$mutt_pgpsigned)/o) + $$L[$x]=~/^(?:\e.+?\a)?(?:\Q$mutt_pgpencrypted\E|\Q$mutt_pgpclearsigned\E|\Q$mutt_pgpsigned\E)/o) { splice(@$L, $x+1, 0, @{$tmp[$tmp]}); for (my $i=$x; $i