X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=scripts%2Fssoma-replay;h=50bf45604b19aa7acefba902ebde6c86015bb304;hb=23d896234f3eb5e579de2e8ddf3c723654862ade;hp=91c121dd2f0e3eda8b1232d8c8cdfbab325ec8d7;hpb=fcfef9420b639214b325dd17f8a7ae151c21f627;p=public-inbox.git diff --git a/scripts/ssoma-replay b/scripts/ssoma-replay index 91c121dd..50bf4560 100755 --- a/scripts/ssoma-replay +++ b/scripts/ssoma-replay @@ -45,7 +45,9 @@ my $body = $msg->body; my $list_id = $header_obj->header('List-Id'); my ($archive_url, $user, $domain); if (defined $list_id) { - ($user, $domain) = ($list_id =~ /<(.+)\@(.+)>/g); + # due to a bug in old versions of public-inbox, was used + # as the list-Id instead of as recommended in RFC2919 + ($user, $domain) = ($list_id =~ /<([^\.@]+)[\.@](.+)>/g); if (defined $domain) { $archive_url = "https://$domain/$user/"; @@ -53,7 +55,8 @@ if (defined $list_id) { if ($mid =~ /\A<(.+)>\z/) { $mid = $1; } - $mid = uri_escape_utf8($mid); + $mid = uri_escape_utf8($mid, + '^A-Za-z0-9\-\._~!\$\&\';\(\)\*\+,;=:@'); $header_obj->header_set('List-Archive', "<$archive_url>"); foreach my $h (qw(Help Unsubscribe Subscribe Owner)) {