Commit 6c320c3e authored by sikeda's avatar sikeda
Browse files

[bug] If UNSUBSCRIBE command with an email parameter not the same as sender is...

[bug] If UNSUBSCRIBE command with an email parameter not the same as sender is sent and "unsubscribe" scenario returns value "request_auth(sender)", an invalid auth key will be sent back to the sender.  Fixed by generating auth key using right parameter.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12611 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 93170104
......@@ -214,8 +214,9 @@ sub request_auth {
$data->{'list_context'} = 1;
if ($cmd =~ /signoff$/) {
$keyauth = Sympa::compute_auth($list, $email, 'signoff');
$data->{'command'} = "auth $keyauth $cmd $listname $email";
$param[0] ||= $email;
$keyauth = Sympa::compute_auth($list, $param[0], 'signoff');
$data->{'command'} = "auth $keyauth $cmd $listname $param[0]";
$data->{'type'} = 'signoff';
} elsif ($cmd =~ /subscribe$/) {
......
......@@ -1563,7 +1563,7 @@ sub signoff {
}
my $cmd = 'signoff';
$cmd = "quiet $cmd" if $quiet;
unless (Sympa::request_auth($list, $to, $cmd)) {
unless (Sympa::request_auth($list, $to, $cmd, $email)) {
my $error =
'Unable to request authentication for command "signoff"';
Sympa::Report::reject_report_cmd('intern', $error,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment