From 7dfab1e00ad185a88623891bc5a098db063b1991 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Fri, 14 Mar 2014 16:04:14 +0100 Subject: [PATCH] [PASSED QA] Bug 11926: URI-encode data sent to statistics server Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer --- C4/UsageStats.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/UsageStats.pm b/C4/UsageStats.pm index 3fcd6f3..a5478b7 100644 --- a/C4/UsageStats.pm +++ b/C4/UsageStats.pm @@ -24,6 +24,7 @@ use C4::Context; use POSIX qw(strftime); use LWP::UserAgent; use JSON; +use URI::Encode qw(uri_encode); =head1 NAME C4::UsageStats @@ -369,7 +370,7 @@ Send to hea.koha-community.org database informations sub ReportToCommunity { my $data = shift; - my $json = to_json($data); + my $json = uri_encode(to_json($data), 1); my $ua = LWP::UserAgent->new; my $req = HTTP::Request->new(POST => "http://hea.koha-community.org/upload.pl"); -- 1.9.1