Accéder au contenu.
Menu Sympa

fr - Signed multipart moderation patch

Objet : Pour les administrateurs de serveurs de listes utilisant le logiciel Sympa

Archives de la liste

Chronologique Discussions  
  • From: Olivier Salaun <adresse@cachée>
  • To: adresse@cachée
  • Cc: adresse@cachée, adresse@cachée
  • Subject: Signed multipart moderation patch
  • Date: Tue, 27 Mar 2001 11:04:06 +0200

We were reported problems with moderation of signed multipart messages :

Sympa was breaking the signature because it used an intermediate
MIME::Entity object that encoded base64 attachements in a
different format.

Here is a patch for this bug :

--
Olivier Salaün
Comité Réseaux des Universités*** src/List.pm:1.58 Fri Mar 23 15:12:31 2001
--- src/List.pm Fri Mar 23 16:40:40 2001
***************
*** 1211,1226 ****
if ($method eq 'md5');

if($method eq 'md5'){
! open(OUT, ">$modqueue\/$name\_$modkey") || return;
! if ($encrypt eq 'smime_crypted') {
! open (ENCRYPTEDMSG, $file) ;
! while (<ENCRYPTEDMSG>) {
! print OUT ;
! }
! close ENCRYPTEDMSG ;
! }else{
! $msg->print(\*OUT);
}
close(OUT);
}
foreach $i (@{$admin->{'editor'}}) {
--- 1211,1232 ----
if ($method eq 'md5');

if($method eq 'md5'){
! unless (open(OUT, ">$modqueue\/$name\_$modkey")) {
! do_log('notice', 'Could not open %s', "$modqueue\/$name\_$modkey");
! return undef;
! }
!
! ## Always copy the original, not the MIME::Entity
! ## This prevents from message alterations
! unless (open (MSG, $file)) {
! do_log('notice', 'Could not open %s', $file);
! return undef;
! }
! while (<MSG>) {
! print OUT ;
}
+ close MSG ;
+
close(OUT);
}
foreach $i (@{$admin->{'editor'}}) {
***************
*** 1286,1294 ****
print DESC "\n";
print DESC "--$boundary\n" if ($method eq 'md5');
print DESC "Content-Type: message/rfc822\n\n" if ($method eq 'md5');
-
- $msg->print(\*DESC);

close(DESC);
}
return $modkey;
--- 1292,1303 ----
print DESC "\n";
print DESC "--$boundary\n" if ($method eq 'md5');
print DESC "Content-Type: message/rfc822\n\n" if ($method eq 'md5');

+ unless (open (MSG, $file)) {
+ do_log('notice', 'Could not open %s', $file);
+ return undef;
+ }
+ print DESC <MSG>;
close(DESC);
}
return $modkey;


  • Signed multipart moderation patch, Olivier Salaun, 27/03/2001

Archives gérées par MHonArc 2.6.19+.

Haut de le page