Bug 11926: URI-encode data sent to statistics server
authorJulian Maurice <julian.maurice@biblibre.com>
Fri, 14 Mar 2014 15:04:14 +0000 (16:04 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 22 Oct 2014 18:17:04 +0000 (15:17 -0300)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/UsageStats.pm

index 3fcd6f3..a5478b7 100644 (file)
@@ -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");