From 666844ae42b5b17fd2e9b7ea6cf04727487b5322 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 23 Jun 2017 02:25:33 +0000 Subject: reply: handle address obfuscation :< We can show users a lightly-obfuscated Bourne shell command for invoking "git send-email" for address obfuscation. However, I'm not sure if the mailto: arg will work effectively since URL encoding is probably too well-known to be effective. --- t/reply.t | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 't') diff --git a/t/reply.t b/t/reply.t index 640069cb..719b4e47 100644 --- a/t/reply.t +++ b/t/reply.t @@ -64,4 +64,16 @@ $ibx->{replyto} = 'new@example.com'; $exp = [ '--in-reply-to=blah@example.com', '--to=new@example.com' ]; is_deeply($arg, $exp, 'explicit address works, too'); +$ibx->{replyto} = ':all'; +$ibx->{obfuscate} = 1; +($arg, $link) = PublicInbox::Reply::mailto_arg_link($ibx, $hdr); +$exp = [ + '--in-reply-to=blah@example.com', + '--to=from@example$(echo .)com', + '--cc=cc@example$(echo .)com', + '--cc=to@example$(echo .)com' +]; +is_deeply($arg, $exp, 'address obfuscation works'); +is($link, '', 'no mailto: link given'); + done_testing(); -- cgit v1.2.3-24-ge0c7