From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-5.4 required=3.0 tests=ALL_TRUSTED,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RP_MATCHES_RCVD,URIBL_BLOCKED shortcircuit=no autolearn=unavailable autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 9EF341F955 for ; Sat, 21 May 2016 04:24:35 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/3] unsubscribe: bad URL fixup Date: Sat, 21 May 2016 04:24:34 +0000 Message-Id: <20160521042435.12800-1-e@80x24.org> In-Reply-To: <20160520213655.19381-1-e@80x24.org> References: <20160520213655.19381-1-e@80x24.org> List-Id: Fixup a comment about s/query string/PATH_INFO/ while we're at it, as pre-published versions of this used query strings before I determined it could be harder to copy+paste URLs with query parameters in them. --- lib/PublicInbox/Unsubscribe.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/Unsubscribe.pm b/lib/PublicInbox/Unsubscribe.pm index 1f5ce31..4ccdb7e 100644 --- a/lib/PublicInbox/Unsubscribe.pm +++ b/lib/PublicInbox/Unsubscribe.pm @@ -77,7 +77,7 @@ sub _user_list_addr { 'Missing mailing list name in path component'); } my $user = eval { $self->{cipher}->decrypt(decode_base64url($u)) }; - if (!defined $user) { + if (!defined $user || $user eq '') { my $err = quotemeta($@); my $errors = $env->{'psgi.errors'}; $errors->print("error decrypting: $u\n"); @@ -86,7 +86,7 @@ sub _user_list_addr { } # The URLs are too damn long if we have the encrypted domain - # name in the query string + # name in the PATH_INFO if (index($list, '@') < 0) { my $host = (split(':', $env->{HTTP_HOST}))[0]; $list .= '@'.$host;