ACRA / acralyzer

Open source backend for ACRA reports.
GNU General Public License v3.0
489 stars 90 forks source link

Custom data does not support newlines #23

Closed antoche closed 11 years ago

antoche commented 11 years ago

If I add custom data with newlines in it, the lines after the first ones turn into keys in the custom data table.

For example, calling ACRA.getErrorReporter().putCustomData( "USER_COMMENT", "hah\nha" ); results in the following data in the database entry:

"CUSTOM_DATA": {
   "USER_COMMENT": "hah",
   "ha": true

}

In this case the value came from an EditText in an Activity. Sounds like a potential security issue, doesn't it?

halkeye commented 11 years ago

Related to #21

KevinGaudin commented 11 years ago

It might rather be an issue in ACRA's JSONReportBuilder.

KevinGaudin commented 11 years ago

It's actually an issue in the way Custom Data are transformed into a single String to be stored in the final Properties file on the android device disk. I have to update ACRA to escape new lines during this process.