Skip to Content.
Sympa Menu

devel - Re: [sympa-dev] list naming bug

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Sergiy Zhuk <address@concealed>
  • To: Olivier Salaun <address@concealed>
  • Cc: sympa-dev <address@concealed>, sympa-authors <address@concealed>
  • Subject: Re: [sympa-dev] list naming bug
  • Date: Tue, 25 Jun 2002 12:55:16 -0700 (PDT)

hi

On Tue, 25 Jun 2002, Olivier Salaun wrote:

> You're right and your patch looks just fine, we've applied it :

thanks
you might wanna apply my prev. patch for sympa.pl which is also using
list_check_suffixes to exclude suffixes not in use, e.g. I'm not using
-editor suffix, so there's no reason to reserve it.
I'm attaching it once again just in case.
It'a a patch vs ver 3.3.5

> But we should extend default value for 'list_check_suffixes' to
> 'request,owner,unsubscribe,subscribe,editor'
> (it is currently 'request,owner,unsubscribe')

sure

--
rgds,
serge
--- sympa.pl 2002/06/05 01:16:21 1.4
+++ sympa.pl 2002/06/05 01:17:03 1.5
@@ -403,7 +403,9 @@
}
# do_log('debug2', "listname %s robot %s", $t_listname,$t_robot);

- if ($t_listname =~
/^(\S+)-(request|owner|editor|subscribe|unsubscribe)$/) {
+ my $regx = $Conf{'robots'}{$robot}{'list_check_suffixes'} ||
$Conf{'list_check_suffixes'};
+ $regx =~ s/,/\|/g;
+ if ($t_listname =~ /^(\S+)-(${regx})$/) {
($t_listname, $type) = ($1, $2);
}

@@ -676,6 +678,18 @@
do_log('debug', "message is signed, signature is checked");
}

+ # only allow commands which have aliases (list_check_suffixes)
+ my $regx;
+ my @reg;
+ my $word;
+ my $suffixes = $Conf{'robots'}{$robot}{'list_check_suffixes'} ||
$Conf{'list_check_suffixes'};
+ undef @reg;
+ foreach $word ('owner','request','editor')
+ {
+ push @reg,$word if ($suffixes =~ /(^|,)${word}(,|$)/);
+ }
+ $regx = join('|',@reg);
+
if ($rcpt =~ /^listmaster(\@(\S+))?$/) {
$status = &DoForward('sympa', 'listmaster', $robot, $msg, $file,
$sender);

@@ -685,7 +699,7 @@
$status = &DoCommand($rcpt, $robot, $msg, $file);

## forward mails to <list>-request <list>-owner etc
- }elsif ($rcpt =~ /^(\S+)-(request|owner|editor)(\@(\S+))?$/o) {
+ }elsif ($rcpt =~ /^(\S+)-(${regx})(\@(\S+))?$/o) {
my ($name, $function) = ($1, $2);

## Simulate Smartlist behaviour with command in subject



Archive powered by MHonArc 2.6.19+.

Top of Page