gecko-dev/services/healthreport
Gregory Szorc 8ea5c183d9 Bug 1055102 - Properly handle Unicode in Bagheera payloads; r=bsmedberg
It was observed that FHR was sending invalid JSON payloads to the
server. Specifically, JSON payloads contained invalid Unicode strings.

Investigation revealed that the culprint was CommonUtils.convertString()
silently swallowing high bytes. When the Bagheera client went to gzip
the JSON payload, the input buffer into gzip was missing high bytes.

This patch changes the bagheera client to UTF-8 encode strings before
gzip, thus ensuring all data is preserved. A corresponding change was
also added to the mock bagheera server implementation.

Alternatively, we could have changed CommonUtils.convertString() to
be high byte aware. However, many consumers rely on this function.
This patch is written with the intent of being uplifted and the change
performed is targeted at the specific problem.

Tests for Unicode preserving behavior have been added to both the
generic Bagheera client and to FHR. The latter test is arguably
not necessary, but peace of mind is a good thing, especially with
FHR.

See also bug 915850.

--HG--
extra : rebase_source : 4efddea7767c2e5f8cf19df247c3aba07c40eec6
extra : amend_source : ae3b6d89efa54fc9ed1794404476622946ad4b22
2014-08-19 09:12:12 -07:00
..
docs Bug 1009765 - Add GMP plugin crashes to FHR crash reporting (part 2: FHR, toolkit/components/crashes). r=gps 2014-08-08 15:41:07 -07:00
modules-testing Bug 1053315 - Catch more errors during upload; r=bsmedberg 2014-08-13 11:18:22 -07:00
tests Bug 1055102 - Properly handle Unicode in Bagheera payloads; r=bsmedberg 2014-08-19 09:12:12 -07:00
HealthReport.jsm Bug 1014524 - Add HotfixProvider to XPCOM manifest; r=rnewman 2014-07-29 11:11:51 -07:00
HealthReportComponents.manifest Bug 1014524 - Add HotfixProvider to XPCOM manifest; r=rnewman 2014-07-29 11:11:51 -07:00
healthreport-prefs.js bug 867737 - update FHR reporting URL, r=gps 2013-05-05 10:04:38 -04:00
healthreporter.jsm Bug 1053315 - Catch more errors during upload; r=bsmedberg 2014-08-13 11:18:22 -07:00
moz.build Bug 1054476 - move INSTALL_TARGETS in services/ Makefiles to EXTRA_{PP_,}JS_MODULES; r=gps 2014-07-28 15:24:01 -04:00
profile.jsm Bug 1048989 - Fix 'useless expression' warnings with MERGED_COMPONENT. r=gps 2014-08-07 21:52:05 -07:00
providers.jsm Bug 1009765 - Add GMP plugin crashes to FHR crash reporting (part 2: FHR, toolkit/components/crashes). r=gps 2014-08-08 15:41:07 -07:00