From 41026707e0efc162394a205472271275a5cefda3 Mon Sep 17 00:00:00 2001 From: IKEDA Soji Date: Wed, 14 Jun 2023 07:02:25 +0900 Subject: [PATCH] Workaround for Issue 1685 --- src/lib/Sympa/List.pm | 18 ------------------ src/lib/Sympa/Message.pm | 4 ---- 2 files changed, 22 deletions(-) diff --git a/src/lib/Sympa/List.pm b/src/lib/Sympa/List.pm index e862d5b3b..6712183b1 100644 --- a/src/lib/Sympa/List.pm +++ b/src/lib/Sympa/List.pm @@ -5885,24 +5885,6 @@ sub add_list_header { ); $message->add_header('List-Help', join ', ', map { sprintf '<%s>', $_ } @urls); - } elsif ($field eq 'unsubscribe' and $options{oneclick}) { - if ($wwsympa_url - and my $id = $self->oneclick_id($options{oneclick})) { - my @urls = ( - Sympa::get_url($self, 'oneclick', paths => [$id]), - Sympa::Tools::Text::mailtourl( - Sympa::get_address($self, 'sympa'), - query => {subject => sprintf('SIG %s', $self->{'name'})} - ) - ); - # Overwrite existing fields to prevent forgery. - $message->delete_header('List-Unsubscribe-Post'); - $message->delete_header('List-Unsubscribe'); - $message->add_header('List-Unsubscribe-Post', - 'List-Unsubscribe=One-Click'); - $message->add_header('List-Unsubscribe', - join ', ', map { sprintf '<%s>', $_ } @urls); - } } elsif ($field eq 'unsubscribe') { my @urls = ( ($wwsympa_url ? (Sympa::get_url($self, 'signoff')) : ()), diff --git a/src/lib/Sympa/Message.pm b/src/lib/Sympa/Message.pm index 9523bb8b4..4378bcffb 100644 --- a/src/lib/Sympa/Message.pm +++ b/src/lib/Sympa/Message.pm @@ -471,8 +471,6 @@ sub dkim_sign { $log->syslog('err', 'Can\'t create Mail::DKIM::Signer'); return undef; } - # For One-Click Unsubscribe. - $dkim->extended_headers({'List-Unsubscribe-Post' => '*'}); # $new_body will store the body as fed to Mail::DKIM to reuse it # when returning the message as string. Line terminators must be @@ -535,8 +533,6 @@ sub arc_seal { $log->syslog('err', 'Can\'t create Mail::DKIM::ARC::Signer'); return undef; } - # For One-Click Unsubscribe. - $arc->extended_headers({'List-Unsubscribe-Post' => '*'}); # $new_body will store the body as fed to Mail::DKIM to reuse it # when returning the message as string. Line terminators must be