[request-tracker-maintainers] Bug#795133: SMIME does not work with non-ascii emails in RT 4.2.8-3 and 4.2.11-1
Max Kosmach
max at tcen.ru
Mon Aug 10 19:43:39 UTC 2015
Package: request-tracker4
Version: 4.2.8-3
Severity: important
Tags: patch
Hi!
When SMIME support in 4.2.8-3 is enabled I have a problem with non-ascii signed emails.
When this email received by RT I see error like this in logs:
Aug 10 17:01:59 rt postfix/local[4066]: D66DD14A005: to=<rt at localdomain>, relay=local, delay=158, delays=158/0.03/0/0.4, dsn=4.3.0, status=deferred
(temporary failure. Command output: RT server error. The RT server which handled your email did not behave as expected. It said: Cannot decode
string with wide characters at /usr/lib/i386-linux-gnu/perl/5.20/Encode.pm line 175. Stack: [/usr/lib/i386-linux-gnu/perl/5.20/Encode.pm:175]
[/usr/share/request-tracker4/lib/RT/Interface/Email/Auth/Crypt.pm:177] [/usr/share/request-tracker4/lib/RT/Interface/Email.pm:1300]
[/usr/share/request-tracker4/html/REST/1.0/NoAuth/mail-gateway:61] )
Same problem with 4.2.11-1 when I send same email from CLI:
Cannot decode string with wide characters at /usr/lib/i386-linux-gnu/perl5/5.20/Encode.pm line 200.
Stack:
[/usr/lib/i386-linux-gnu/perl5/5.20/Encode.pm:200]
[/usr/share/request-tracker4/lib/RT/Interface/Email/Auth/Crypt.pm:177]
[/usr/share/request-tracker4/lib/RT/Interface/Email.pm:1321]
[/usr/share/request-tracker4/html/REST/1.0/NoAuth/mail-gateway:61]
RT server error.
I think patch below fixes this problem, but I don't know is this patch fully correct or not:
===
diff -urN /usr/share/request-tracker4/lib/RT/Crypt.pm /usr/share/request-tracker4/lib/RT/Crypt.pm.new
--- /usr/share/request-tracker4/lib/RT/Crypt.pm 2015-05-10 22:25:52.000000000 +0300
+++ /usr/share/request-tracker4/lib/RT/Crypt.pm.new 2015-08-10 22:14:50.916118963 +0300
@@ -545,7 +545,7 @@
my $modify = $res{status_on}->head->modify;
$res{status_on}->head->modify(1);
$res{status_on}->head->add(
- "X-RT-" . $protected->{'Protocol'} . "-Status" => $res{'status'}
+ "X-RT-" . $protected->{'Protocol'} . "-Status" => Encode::encode( "UTF-8", $res{'status'})
);
$res{status_on}->head->modify($modify);
===
If this patch correct - please apply it to debian package.
My SMIME config parts:
cat /etc/request-tracker4/RT_SiteConfig.d/98-smime
Set(@MailPlugins, 'Auth::MailFrom', 'Auth::Crypt');
Set(%SMIME,
Enable => 1,
OpenSSL => '/usr/bin/openssl',
Keyring => '/var/lib/request-tracker4/data/smime',
CAPath => '/var/lib/request-tracker4/data/smime/signing-ca.pem',
Passphrase => {
'queue.address at example.com' => 'passphrase',
'' => 'fallback',
},
AcceptUntrustedCAs=> 1,
);
Set( %Crypt,
Incoming => 'SMIME',
Outgoing => undef,
RejectOnUnencrypted => 0,
RejectOnMissingPrivateKey => 0,
RejectOnBadData => 0,
AllowEncryptDataInDB => 0,
Dashboards => {
Encrypt => 0,
Sign => 0,
},
);
--
С уважением,
Космач Максим
More information about the pkg-request-tracker-maintainers
mailing list