Commit fb58e26e authored by Alex Vandiver's avatar Alex Vandiver
Browse files

Dashboard: decode bytes in query parameters into characters

The dashboard mailer code replicates many of the original steps of Mason
parameter parsing -- but omitted the important step of decoding the
bytes once they had been un-URI-encoded.
parent 7548587b
......@@ -564,7 +564,8 @@ sub GetResource {
$HTML::Mason::Commands::r->path_info($path);
# grab the query arguments
my %args = map { $_ => [ $uri->query_param($_) ] } $uri->query_param;
my %args = map { $_ => [ map {Encode::decode("UTF-8",$_)}
$uri->query_param($_) ] } $uri->query_param;
# Convert empty and single element arrayrefs to a non-ref scalar
@$_ < 2 and $_ = $_->[0]
for values %args;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment