From 2ec1ac4a259c87ad453195fa405c6aa7d99d7cb7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 21 May 2016 04:12:45 +0000 Subject: unsubscribe: bad URL fixup 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(-) (limited to 'lib') diff --git a/lib/PublicInbox/Unsubscribe.pm b/lib/PublicInbox/Unsubscribe.pm index 1f5ce315..4ccdb7e0 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; -- cgit v1.2.3-24-ge0c7