Skip to Content.
Sympa Menu

fr - probleme MD5 pour les proprietaires

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

List archive

Chronological Thread  
  • From: Olivier LACROIX <address@concealed>
  • To: address@concealed
  • Subject: probleme MD5 pour les proprietaires
  • Date: Thu, 29 Jan 1998 12:36:52 +0100


J'ai détecté des erreurs dans les commandes ADD et DEL au cas où on utilise
MD5 pour les propriétaires des listes.

Pour ADD, il s'agissait seulement d'un mauvais message dans les logs, j'ai
ajouté le message dans fr.msg (patch ci-dessous).

Pour DEL, c'est un peu plus compliqué :
il y avait un mauvais message dans les logs : je l'ai ajouté
il y a avait une confusion de variable pour la personne à supprimer ($who et
$email), j'ai tout changé en $email (patch de Command.pl ci-dessous)

Reste un autre problème que je n'arrive pas à résoudre : la demande de
confirmation envoyée au propriétaire de la liste est fausse uniquement pour
DEL.
Si j'envoie à sympa la commande : del listetest machin@domaine, la commande
d'authentification qui m'est envoyé est fausse. J'obtiens :
en version anglaise : auth c2d805ff listetest machin@domaine
en version française : auth c2d805ff add listetest machin@domaine

J'ai bien vu dans la commande del l'utilisation d'une variable $comment qui
n'est pas initialisée, mais malgré mes essais, je n'ai pas réussi à résoudre
l'erreur.



*** Commands.pm.orig	Thu Jan 29 11:46:27 1998
--- Commands.pm	Thu Jan 29 11:58:01 1998
***************
*** 509,515 ****
           printf Msg(6, 39, $msg::adddel_need_auth), $which, $Conf{'sympa'},
                  substr(MD5->hexhash(join('/', $list->get_cookie(), $which, $sender, $email, $comment, 'add')), -8),
                  $which, $email, $comment;
!          do_log('info', Msg(7, 19, 'ADD %s %s sent auth to %s'), $which, $email, $sender);
           return;
        }
     }
--- 509,515 ----
           printf Msg(6, 39, $msg::adddel_need_auth), $which, $Conf{'sympa'},
                  substr(MD5->hexhash(join('/', $list->get_cookie(), $which, $sender, $email, $comment, 'add')), -8),
                  $which, $email, $comment;
!          do_log('info', Msg(7, 25, 'ADD %s %s sent auth to %s'), $which, $email, $sender);
           return;
        }
     }
***************
*** 533,539 ****
  sub del {
     my $what = shift;
     $what =~ /^(\S+)\s+(.+)\s*$/;
!    my($which, $who) = ($1, $2);
     
     ## Load the list if not already done, and reject the
     ## subscription if this list is unknown to us.
--- 533,539 ----
  sub del {
     my $what = shift;
     $what =~ /^(\S+)\s+(.+)\s*$/;
!    my($which, $email) = ($1, $2);
     
     ## Load the list if not already done, and reject the
     ## subscription if this list is unknown to us.
***************
*** 561,567 ****
           printf Msg(6, 39, $msg::adddel_need_auth), $which, $Conf{'sympa'},
                  substr(MD5->hexhash(join('/', $list->get_cookie(), $which, $sender, $email, $comment, 'del')), -8),
                  $which, $email, $comment;
!          do_log('info', Msg(7, 19, 'DEL %s %s sent auth to %s'), $which, $email, $sender);
           return;
        }
     }
--- 561,567 ----
           printf Msg(6, 39, $msg::adddel_need_auth), $which, $Conf{'sympa'},
                  substr(MD5->hexhash(join('/', $list->get_cookie(), $which, $sender, $email, $comment, 'del')), -8),
                  $which, $email, $comment;
!          do_log('info', Msg(7, 26, 'DEL %s %s sent auth to %s'), $which, $email, $sender);
           return;
        }
     }
***************
*** 568,580 ****
  
     ## Check if we know this email on the list and remove it. Otherwise
     ## just reject the message.
!    unless ($list->is_user($who)) {
!       printf Msg(6, 33, "Email address %s has not been found on the list.\n"), $who;
!       do_log('info', Msg(7, 23, 'DEL %s %s by %s rejected because not on list'), $which, $who, $sender);
        return;
     }
     ## Really delete and rewrite to disk.
!    $list->delete_user($who);
     $list->save();
  
     ## Send a notice to the removed user, unless the owner indicated
--- 568,580 ----
  
     ## Check if we know this email on the list and remove it. Otherwise
     ## just reject the message.
!    unless ($list->is_user($email)) {
!       printf Msg(6, 33, "Email address %s has not been found on the list.\n"), $email;
!       do_log('info', Msg(7, 23, 'DEL %s %s by %s rejected because not on list'), $which, $email, $sender);
        return;
     }
     ## Really delete and rewrite to disk.
!    $list->delete_user($email);
     $list->save();
  
     ## Send a notice to the removed user, unless the owner indicated
***************
*** 581,590 ****
     ## quiet del.
     if (!$quiet) {
        my $k = sprintf(Msg(6,34, "You have been removed from list %s\nby %s\n"), $which, $sender);
!       mail::mailback(\$k, sprintf(Msg(6, 18, "You have been removed from list %s\n"), $which), $who);
     }
     print Msg(6, 38, $msg::user_removed_from_list);
!    do_log('info', Msg(7, 24, "DEL %s %s by %s"), $which, $who, $sender);
  }
  
  1;
--- 581,590 ----
     ## quiet del.
     if (!$quiet) {
        my $k = sprintf(Msg(6,34, "You have been removed from list %s\nby %s\n"), $which, $sender);
!       mail::mailback(\$k, sprintf(Msg(6, 18, "You have been removed from list %s\n"), $which), $email);
     }
     print Msg(6, 38, $msg::user_removed_from_list);
!    do_log('info', Msg(7, 24, "DEL %s %s by %s"), $which, $email, $sender);
  }
  
  1;
*** fr.msg.orig	Thu Jan 29 11:45:04 1998
--- fr.msg	Thu Jan 29 11:57:50 1998
***************
*** 186,191 ****
--- 186,193 ----
  22	"ADD %s %s par %s"
  23	"DEL %s de %s : n'est pas abonn"
  24	"DEL %s de %s effectu"
+ 25	"ADD %s %s envoi de l'authentifieur  %s"
+ 26	"DEL %s %s envoi de l'authentifieur  %s"
  
  $delset 8
  $set 8	Messages utilises dans List.pm

Olivier LACROIX

C.I.R.I.L.
Chateau du Montet | Tel : +33 3.83.44.74.29
Rue du Doyen Roubault | Fax : +33 3.83.44.02.62
F - 54500 VANDOEUVRE | email : address@concealed



Archive powered by MHonArc 2.6.19+.

Top of Page