diff options
author | Eric Wong <e@80x24.org> | 2014-04-12 01:06:58 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2014-04-12 01:21:23 +0000 |
commit | 59438d115d1cf52d12258b5d94bae5219daaae41 (patch) | |
tree | c62e512a10d5e9e9361319dbc3f30312be185292 /public-inbox.cgi | |
parent | c4e1a5af31e924077568823ef83d00d1462f5f12 (diff) | |
download | public-inbox-59438d115d1cf52d12258b5d94bae5219daaae41.tar.gz |
MIDs may have strange characters in them, so we need to handle escaping/unescaping properly to avoid broken links or worse.
Diffstat (limited to 'public-inbox.cgi')
-rwxr-xr-x | public-inbox.cgi | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/public-inbox.cgi b/public-inbox.cgi index 313a4f22..1765cf45 100755 --- a/public-inbox.cgi +++ b/public-inbox.cgi @@ -15,6 +15,7 @@ use warnings; use CGI qw(:cgi :escapeHTML -nosticky); # PSGI/FastCGI/mod_perl compat use Encode qw(decode_utf8); use PublicInbox::Config; +use URI::Escape qw(uri_unescape); use Digest::SHA qw(sha1_hex); our $LISTNAME_RE = qr!\A(?:/.*?)?/([\w\.\-]+)!; our $pi_config; @@ -102,7 +103,7 @@ sub invalid_list { sub invalid_list_mid { my ($ctx, $listname, $mid) = @_; my $ret = invalid_list($ctx, $listname, $mid) and return $ret; - $ctx->{mid} = $mid; + $ctx->{mid} = uri_unescape($mid); undef; } |