[Pgp-tools-commit] r721 - in trunk: caff debian
Guilhem Moulin
guilhem-guest at moszumanska.debian.org
Thu Oct 30 16:54:16 UTC 2014
Author: guilhem-guest
Date: 2014-10-30 16:54:16 +0000 (Thu, 30 Oct 2014)
New Revision: 721
Modified:
trunk/caff/caff
trunk/debian/changelog
Log:
Fix RCF 2822 violation: Never localize the "Date" header.
Modified: trunk/caff/caff
===================================================================
--- trunk/caff/caff 2014-10-11 21:10:54 UTC (rev 720)
+++ trunk/caff/caff 2014-10-30 16:54:16 UTC (rev 721)
@@ -383,7 +383,7 @@
use IO::Select;
use Getopt::Long;
use GnuPG::Interface;
-use POSIX qw{strftime};
+use POSIX qw{strftime setlocale};
my %CONFIG;
my $REVISION = '$Rev$';
@@ -908,7 +908,7 @@
};
$message_entity->head->add("From", Encode::encode('MIME-Q', $CONFIG{'owner'}).' <'.$CONFIG{'email'}.'>');
- $message_entity->head->add("Date", strftime("%a, %e %b %Y %H:%M:%S %z", localtime));
+ $message_entity->head->add("Date", strfCtime("%a, %e %b %Y %H:%M:%S %z", localtime));
$message_entity->head->add("Subject", "Your signed PGP key 0x$key_id");
$message_entity->head->add("To", email_to_ascii($address));
$message_entity->head->add("Sender", Encode::encode('MIME-Q', $CONFIG{'owner'}).' <'.$CONFIG{'email'}.'>');
@@ -1175,6 +1175,18 @@
return 0;
}
+##
+# A non-localized version of POSIX::strftime.
+#
+sub strfCtime($@) {
+ my $lc_time = setlocale(POSIX::LC_TIME);
+ setlocale(POSIX::LC_TIME, 'C');
+ my $str = strftime(@_);
+ setlocale(POSIX::LC_TIME, $lc_time);
+ return $str;
+}
+
+
###################
# argument handling
###################
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2014-10-11 21:10:54 UTC (rev 720)
+++ trunk/debian/changelog 2014-10-30 16:54:16 UTC (rev 721)
@@ -1,3 +1,16 @@
+signing-party (1.1.11-1) UNRELEASED; urgency=low
+
+ [ Thijs Kinkhorst ]
+ * Remove self from from uploaders.
+
+ [ Guilhem Moulin ]
+ * caff:
+ + Fix RCF 2822 violation: Never localize the "Date" header, regarless of
+ the LC_ALL, LC_TIME and LANG in use. Regression introduced in r698.
+ (Closes: #767371)
+
+ -- Guilhem Moulin <guilhem at guilhem.org> Thu, 30 Oct 2014 17:44:11 +0100
+
signing-party (1.1.10-1) unstable; urgency=low
* debian.compat:
More information about the Pgp-tools-commit
mailing list