{"action":"created","issue":{"url":"https://api.github.com/repos/WhisperSystems/TextSecure/issues/2294","labels_url":"https://api.github.com/repos/WhisperSystems/TextSecure/issues/2294/labels{/name}","comments_url":"https://api.github.com/repos/WhisperSystems/TextSecure/issues/2294/comments","events_url":"https://api.github.com/repos/WhisperSystems/TextSecure/issues/2294/events","html_url":"https://github.com/WhisperSystems/TextSecure/pull/2294","id":53337466,"number":2294,"title":"limit displayed message length to 1024 characters.","user":{"login":"phryneas","id":4282439,"avatar_url":"https://avatars.githubusercontent.com/u/4282439?v=3","gravatar_id":"","url":"https://api.github.com/users/phryneas","html_url":"https://github.com/phryneas","followers_url":"https://api.github.com/users/phryneas/followers","following_url":"https://api.github.com/users/phryneas/following{/other_user}","gists_url":"https://api.github.com/users/phryneas/gists{/gist_id}","starred_url":"https://api.github.com/users/phryneas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phryneas/subscriptions","organizations_url":"https://api.github.com/users/phryneas/orgs","repos_url":"https://api.github.com/users/phryneas/repos","events_url":"https://api.github.com/users/phryneas/events{/privacy}","received_events_url":"https://api.github.com/users/phryneas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-04T14:15:24Z","updated_at":"2015-01-04T16:57:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/WhisperSystems/TextSecure/pulls/2294","html_url":"https://github.com/WhisperSystems/TextSecure/pull/2294","diff_url":"https://github.com/WhisperSystems/TextSecure/pull/2294.diff","patch_url":"https://github.com/WhisperSystems/TextSecure/pull/2294.patch"},"body":"* limit displayed message length to 1024 characters.\r\n* added a \"messageTooLongIndicator\" that can be clicked to display the\r\nfull content of a truncated message\r\n\r\nthis should concern issues #2252 #2226 and  #2271 (and possibly more)\r\n\r\neven though it does not resolve the problem of corruped messages, corrupted messages won't crash textsecure any more and it is possible to delete them\r\n\r\nthis also removes a possible DOS on a user's history with another user by sending a very long message that will crash on display and thus prevent scrolling back in history\r\n\r\n\r\nlogcat for the case of a too big message crashing TS:\r\n\r\n    01-04 14:18:57.523  14631-14642/org.thoughtcrime.securesms I/art﹕ [ 01-04 14:18:58.045 14631:14642 I/art      ]\r\n        Wrote stack traces to '/data/anr/traces.txt'\r\n    01-04 14:19:00.477  14631-14631/org.thoughtcrime.securesms A/libc﹕ new[] failed to allocate 296136 bytes\r\n    01-04 14:19:00.477  14631-14631/org.thoughtcrime.securesms A/libc﹕ Fatal signal 6 (SIGABRT), code -6 in tid 14631 (crime.securesms)\r\n\r\n(content of /data/anr/traces.txt did not seem too interesting to me but if requested, I can provide it)"},"comment":{"url":"https://api.github.com/repos/WhisperSystems/TextSecure/issues/comments/68639786","html_url":"https://github.com/WhisperSystems/TextSecure/pull/2294#issuecomment-68639786","issue_url":"https://api.github.com/repos/WhisperSystems/TextSecure/issues/2294","id":68639786,"user":{"login":"phryneas","id":4282439,"avatar_url":"https://avatars.githubusercontent.com/u/4282439?v=3","gravatar_id":"","url":"https://api.github.com/users/phryneas","html_url":"https://github.com/phryneas","followers_url":"https://api.github.com/users/phryneas/followers","following_url":"https://api.github.com/users/phryneas/following{/other_user}","gists_url":"https://api.github.com/users/phryneas/gists{/gist_id}","starred_url":"https://api.github.com/users/phryneas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phryneas/subscriptions","organizations_url":"https://api.github.com/users/phryneas/orgs","repos_url":"https://api.github.com/users/phryneas/repos","events_url":"https://api.github.com/users/phryneas/events{/privacy}","received_events_url":"https://api.github.com/users/phryneas/received_events","type":"User","site_admin":false},"created_at":"2015-01-04T16:57:46Z","updated_at":"2015-01-04T16:57:46Z","body":"Oh sorry I didn't know there even were such a thing as code guidelines.\r\nI found them now in the wiki and will clean the code up accordingly.\r\n\r\nTo prevent that in the future: Could a link the code guidelines maybe be added to the README.md under \"Contributing Code\" or at least the BUILDING.md?"}}