From: Gerfried Fuchs Date: Wed, 17 Feb 2010 19:46:44 +0000 (+0100) Subject: Imported Upstream version 2.1 X-Git-Tag: upstream/2.1^0 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=2d178478460edcfdc4055642761b157ecb32c28f;p=pkg%2Ft-prot.git Imported Upstream version 2.1 --- diff --git a/ChangeLog b/ChangeLog index 7e1d102..61e9b52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,39 @@ +2006-06-17 22:45 Jochen Striepe + + * t-prot: Release as v2.1. + +2006-06-17 22:45 Jochen Striepe + + * t-prot: Frank Terbeck suggested a more tolerant handling of + signatures -- trailing newlines are no longer counted as signature + lines, thus fixing some mailing list software behaviour. + +2006-06-17 12:34 Jochen Striepe + + * t-prot.1: Update time stamp. + +2006-06-17 12:34 Jochen Striepe + + * t-prot.1: Section "BUGS" is for known bugs in t-prot, not for + learning how to report them. + +2006-05-16 12:07 Jochen Striepe + + * t-prot: Klaus Ethgen reported some undetected MS TOFU hidden in + MIME attachments. Many thanks! + +2006-05-16 12:07 Jochen Striepe + + * t-prot.1: There is no BUGS file any longer. + +2006-05-16 11:34 Jochen Striepe + + * t-prot.1: Time stamp and copyright updated. + +2006-05-16 11:33 Jochen Striepe + + * contrib/t-prot.sl: Clarify comments reg. S-Lang v2. + 2005-06-29 12:45 Jochen Striepe * t-prot.1: Better formatting for "see also". diff --git a/TODO b/TODO index 9422bb3..f384c55 100644 --- a/TODO +++ b/TODO @@ -56,4 +56,4 @@ be nice to have an alternative taking effect immediately. Please remember that t-prot.sl is an *example* script (for you to get an idea on how to integrate t-prot into other software), so these are really low priority. However, patches in unified diff format are always -welcome. ;) +welcome. diff --git a/contrib/README.patches b/contrib/README.patches index 8e65813..ea7af00 100644 --- a/contrib/README.patches +++ b/contrib/README.patches @@ -34,11 +34,17 @@ No problem, these patches add the locales needed for them to work smoothly. Please send a bug report if there are some great new features in the new mutt or gnupg which break anything inside t-prot. +t-prot.sl-slang2.diff +===================== +Patch by Gregor Herrmann, making t-prot.sl run with Slang-2. + + Please note that these patches will most likely be applied by the t-prot package maintainer(s) of your distribution (if the distribution makes use of said mutt and gnupg versions). + OBSOLETE PATCHES ================ diff --git a/contrib/t-prot-r1.243-mutt157.diff b/contrib/t-prot-r1.243-mutt157.diff deleted file mode 100644 index 7ae1ce9..0000000 --- a/contrib/t-prot-r1.243-mutt157.diff +++ /dev/null @@ -1,102 +0,0 @@ ---- t-prot 2005-08-16 16:20:08.000000000 +0200 -+++ t-prot-M157 2005-09-06 14:41:37.000000000 +0200 -@@ -32,7 +32,7 @@ - - $mutt_attachment $mutt_contenttype $mutt_pgpsigned $mutt_beginsigned - $mutt_pgpclearsigned $mutt_pgpclearsigstart $mutt_pgpencrypted -- $mutt_pgpoutstart $mutt_pgpoutend -+ $mutt_pgpoutstart $mutt_pgpoutend $mutt_ssloutstart $mutt_ssloutend - ); - - -@@ -69,6 +69,8 @@ - $mutt_pgpencrypted = '[-- End of PGP/MIME encrypted data --]'; - $mutt_pgpoutstart = '[-- PGP output follows (current time:'; - $mutt_pgpoutend = '[-- End of PGP output --]'; -+$mutt_ssloutstart = '[-- OpenSSL output follows'; -+$mutt_ssloutend = '[-- End of OpenSSL output --]'; - - # set the defaults to the C locale - $gpg_WARNING = 'WARNING: '; -@@ -336,7 +338,7 @@ - for (my $x=0; $x % % This file is provided as an example implemention for articles to be @@ -41,8 +41,9 @@ % OpenBSD or Debian Linux system -- you can get the sources there % if your system happens to lack this program. This macro has been % tested with slrn-0.9.7.4 to slrn-0.9.8.0 and S-Lang v1.4.5, it might -% fail with other versions. As always, bug reports, patches (preferrably -% in unified diff format), comments and suggestions are welcome. +% fail with other versions (and will definitely fail with S-Lang v2.x). +% As always, bug reports, patches (preferrably in unified diff format), +% comments and suggestions are welcome. % % License: This file is part of the t-prot package and therefore % available under the same conditions. See t-prot's man page for diff --git a/contrib/t-prot.sl-slang2.diff b/contrib/t-prot.sl-slang2.diff new file mode 100644 index 0000000..0635ff7 --- /dev/null +++ b/contrib/t-prot.sl-slang2.diff @@ -0,0 +1,44 @@ +Patch 2005-12-23 by Gregor Herrmann, making t-prot.sl run with slang2. +His comment: + +| After some fiddling around and reading manuals I found a workaround: +| replace "error" by "message". +| I don't know if this is the canonical solution but at least the +| errors are gone :-) + + +--- t-prot.sl.2.0.2-1 2005-12-23 19:20:43.000000000 +0100 ++++ t-prot.sl 2005-12-23 19:21:24.000000000 +0100 +@@ -73,3 +73,3 @@ + if (f == NULL) { +- error ("Unable to filter article to "+fname); ++ message ("Unable to filter article to "+fname); + return; +@@ -82,3 +82,3 @@ + if (f == NULL) { +- error (fname+" could not be opened."); ++ message (fname+" could not be opened."); + return; +@@ -90,3 +90,3 @@ + +- if (0 != remove(fname)) error ("Unable to remove "+fname); ++ if (0 != remove(fname)) message ("Unable to remove "+fname); + +@@ -97,6 +97,6 @@ + if (1 == register_hook("read_article_hook", "t_prot")) { +- error("t-prot filtering activated"); ++ message ("t-prot filtering activated"); + } + else { +- error("t-prot filtering NOT activated"); ++ message ("t-prot filtering NOT activated"); + } +@@ -106,6 +106,6 @@ + if (1 == unregister_hook("read_article_hook", "t_prot")) { +- error("t-prot filtering deactivated"); ++ message ("t-prot filtering deactivated"); + } + else { +- error("t-prot filtering NOT deactivated"); ++ message ("t-prot filtering NOT deactivated"); + } diff --git a/t-prot b/t-prot index 1cd6e9d..81fbd71 100755 --- a/t-prot +++ b/t-prot @@ -1,13 +1,13 @@ #!/usr/bin/perl -w -# $Id: t-prot,v 1.243 2005/05/27 10:00:35 jochen Exp $ +# $Id: t-prot,v 1.246 2006/06/17 22:45:55 jochen Exp $ require 5.006; use strict; use Fcntl qw(O_EXCL O_WRONLY O_CREAT); use Getopt::Mixed qw(nextOption); -use constant VER => '2.0'; +use constant VER => '2.1'; use constant REV => ''; -use constant REL => q$Revision: 1.243 $=~m/(\d+(?:\.\d+)+)/; +use constant REL => q$Revision: 1.246 $=~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'; @@ -615,7 +615,7 @@ sub process_msg { /^(?:\e[^\a]+\a)?\Q$mutt_attachment\E\d+/o && $att[$x+1] =~ m!^ (?:\e[^\a]+\a)? - (?:\Q$mutt_contenttype\E) message/rfc822 + (?:\Q$mutt_contenttype\E) (?:message/rfc822|multipart/alternative) !ox) { $x += 2; @@ -634,36 +634,44 @@ sub process_msg { # Remove signature: if (scalar(@$lines)) { my $sn = 0; + my $chk_empty = 1; + my $empty = 0; + for ($x = $#$lines; $x>=0; $x--) { - if ((!$vrb[$x]) && $$lines[$x] =~ /^-- $/) { - if ($diff) { - for (my $i=1; $x+$i+1$lsig))) { - if ($lsig && !$sig) { - unshift(@sig, "[---=| Overlong signature removed by $0: " . - (scalar(@$lines)-$x) . " lines snipped |=---]\n"); + if ($sig || ($lsig && ($#$lines-$x-$empty>$lsig))) { + if ($lsig && !$sig) { + unshift(@sig, "[---=| Overlong signature removed by $0: " . + (scalar(@$lines)-$x) . " lines snipped |=---]\n"); + } + splice(@$lines, $x); } - splice(@$lines, $x); - } - else { - unshift(@sig, @$lines[$x..$#$lines]); - splice(@$lines, $x); + else { + unshift(@sig, @$lines[$x..$#$lines]); + splice(@$lines, $x); + } + if (defined($sign) && ++$sn==$sign) { last; } else { next; } } - if (defined($sign) && ++$sn==$sign) { last; } else { next; } + # any trailing newlines? + elsif ($chk_empty && $$lines[$x] =~ /^\s*$/) { $empty++; } + elsif ($chk_empty) { $chk_empty = 0; } } } } diff --git a/t-prot.1 b/t-prot.1 index 6848fa8..35b1d34 100644 --- a/t-prot.1 +++ b/t-prot.1 @@ -1,6 +1,6 @@ -.\" $Id: t-prot.1,v 1.117 2005/06/29 12:45:55 jochen Exp $ +.\" $Id: t-prot.1,v 1.121 2006/06/17 12:34:54 jochen Exp $ .\" -.TH T-PROT "1" "June 2005" "T-PROT" +.TH T-PROT "1" "June 2006" "T-PROT" .SH NAME t-prot \- TOFU Protection - Display Filter for RFC 2822 messages .SH SYNOPSIS @@ -159,7 +159,8 @@ wrapped around by some MUAs which are known as "Kammquoting" in German. .IR NOTE : This option is considered stable by now. However, sometimes Kammquotes should have been removed but weren't. Please send a bug report if this -happens to you (after carefully reading the BUGS file, that is). +happens to you (after carefully reading the BUGS and REPORTING BUGS +section of this man page, that is). .IP Please also note that enabling this option is quite a performance hit. .TP @@ -531,7 +532,7 @@ Written by Jochen Striepe . All of the documentation and software included in the t-prot releases is copyrighted by Jochen Striepe. .PP -Copyright \(co 2001-2005 Jochen Striepe. All rights reserved. +Copyright \(co 2001-2006 Jochen Striepe. All rights reserved. .PP Redistribution and use, with or without modification, are permitted provided that the following conditions are met: @@ -572,20 +573,20 @@ his script on many usenet postings. You can get the latest version from .IR http://www.escape.de/users/tolot/mutt/ . .SH BUGS +There is a problem when mutt gives a PGP verified or even a multipart +message to t-prot: The information where the PGP encrypted/signed data +or even attachments begin and end is plainly embedded in the text, not +really cleanly recognizeable for t-prot. The problem should be worked +around by now, please send a bug report if it does not work for you. +.SH "REPORTING BUGS" Please note that t-prot development happens on .BR "current stable perl versions only" . If you do run t-prot on earlier (or unstable) perl versions, you might encounter perl compiler bugs (or funny t-prot behaviour). One solution is to upgrade your perl, another is simply to write a bug report. If you do not run a current perl version, please include this information -in your bug report. Thank you. +in your bug report. .PP -There is a problem when mutt gives a PGP verified or even a multipart -message to t-prot: The information where the PGP encrypted/signed data -or even attachments begin and end is plainly embedded in the text, not -really cleanly recognizeable for t-prot. The problem should be worked -around by now, please send a bug report if it does not work for you. -.SH "REPORTING BUGS" Please do .I not report a bug if