aboutsummaryrefslogtreecommitdiffstats
path: root/facebook/facebook-json.c
Commit message (Collapse)AuthorAgeLines
* Updated copyright dates for 2016jgeboski2016-01-15-1/+1
|
* facebook-json: fixed a size overflow with string duplicationjgeboski2015-12-20-1/+6
| | | | | | | | | | | Unlike json_parser_load_from_data(), g_strndup() will not handle signed sizes that are negative. This causes the size to overflow to a really large value, and in turn lead to a segmentation fault. The solution is simple: calculate the size of the data when the given size is negative. This bug was introduced by 0121bae.
* facebook-json:`Special-case "$" to return root for json-glib < 0.99.2dequis2015-12-20-0/+5
| | | | | | | | | | | | | | | | | | | Older glib versions didn't consider "$" to be a valid expression, and threw this error: Root node followed by invalid character ' (That's supposed to be '%c' with a \0) Since this is possibly the simplest expression to parse, a g_strcmp0() can do the job. Thanks to advcomp2019 for reporting this bug and finding a test case where this issue is reproducible every time (receiving events of people joining or leaving in a groupchat) Also thanks to EionRobb who realized what the bug was three hours ago (and I didn't listen because I thought the previous bug was the same)
* facebook-json: Ensure data is null terminated for json-glib < 1.0.2dequis2015-12-20-1/+7
| | | | | | | | | | | | | | | | | Older json-glib versions had a bug[1] in which the length parameter was ignored and this error happened if the input was not null-terminated: JSON data must be UTF-8 encoded Since these versions are expected to still be around in some distros, this commit makes a copy with g_strndup() to ensure that it's always null terminated. Thanks to advcomp2019 for reporting this bug and finding a test case where this issue is reproducible every time (receiving events of people joining or leaving in a groupchat) [1]: https://bugzilla.gnome.org/show_bug.cgi?id=727755
* Imported changes from purple-facebookjgeboski2015-08-24-240/+537
|
* facebook-json: On parse error, show an escaped fragment of the inputdequis2015-03-15-1/+10
| | | | | Just for debugging purposes with users who don't run this with debug enabled.
* Updated copyright dates for 2015jgeboski2015-03-05-1/+1
|
* facebook-json: add fb_json_str_escape() to properly escape messagesdequis2015-03-01-0/+32
| | | | | | | | Fixes issues such as losing messages that include a quote character. Only escapes the minimum needed to work - control characters, backslashes and quotes. UTF-8 chars are still valid json, so they are sent as-is.
* Implemented user authenticationjgeboski2015-01-03-0/+316