{"action":"created","issue":{"url":"https://api.github.com/repos/igniterealtime/Smack/issues/45","labels_url":"https://api.github.com/repos/igniterealtime/Smack/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/igniterealtime/Smack/issues/45/comments","events_url":"https://api.github.com/repos/igniterealtime/Smack/issues/45/events","html_url":"https://github.com/igniterealtime/Smack/pull/45","id":84174465,"number":45,"title":"Better cope with clients with bad extensions or bad priorities.","user":{"login":"felixdoerre","id":10275116,"avatar_url":"https://avatars.githubusercontent.com/u/10275116?v=3","gravatar_id":"","url":"https://api.github.com/users/felixdoerre","html_url":"https://github.com/felixdoerre","followers_url":"https://api.github.com/users/felixdoerre/followers","following_url":"https://api.github.com/users/felixdoerre/following{/other_user}","gists_url":"https://api.github.com/users/felixdoerre/gists{/gist_id}","starred_url":"https://api.github.com/users/felixdoerre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixdoerre/subscriptions","organizations_url":"https://api.github.com/users/felixdoerre/orgs","repos_url":"https://api.github.com/users/felixdoerre/repos","events_url":"https://api.github.com/users/felixdoerre/events{/privacy}","received_events_url":"https://api.github.com/users/felixdoerre/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-02T19:37:06Z","updated_at":"2015-06-03T02:34:28Z","closed_at":"2015-06-02T20:38:28Z","pull_request":{"url":"https://api.github.com/repos/igniterealtime/Smack/pulls/45","html_url":"https://github.com/igniterealtime/Smack/pull/45","diff_url":"https://github.com/igniterealtime/Smack/pull/45.diff","patch_url":"https://github.com/igniterealtime/Smack/pull/45.patch"},"body":"There are clients out there that send strange XML, and Servers that relay such strange XML. The library currently crashes the whole XML-stream when such malformed packages occur. This is a very bad behaviour.\r\n\r\nThe examples I recieved, and for which I provide a patch here are:\r\n* malformed priorities `<presence ...><priority>200</priority>..` or\r\n  empty priorities `<presence ...><priority></priority>..`\r\n* malformed extensions that cause the parser to crash."},"comment":{"url":"https://api.github.com/repos/igniterealtime/Smack/issues/comments/108166047","html_url":"https://github.com/igniterealtime/Smack/pull/45#issuecomment-108166047","issue_url":"https://api.github.com/repos/igniterealtime/Smack/issues/45","id":108166047,"user":{"login":"felixdoerre","id":10275116,"avatar_url":"https://avatars.githubusercontent.com/u/10275116?v=3","gravatar_id":"","url":"https://api.github.com/users/felixdoerre","html_url":"https://github.com/felixdoerre","followers_url":"https://api.github.com/users/felixdoerre/followers","following_url":"https://api.github.com/users/felixdoerre/following{/other_user}","gists_url":"https://api.github.com/users/felixdoerre/gists{/gist_id}","starred_url":"https://api.github.com/users/felixdoerre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixdoerre/subscriptions","organizations_url":"https://api.github.com/users/felixdoerre/orgs","repos_url":"https://api.github.com/users/felixdoerre/repos","events_url":"https://api.github.com/users/felixdoerre/events{/privacy}","received_events_url":"https://api.github.com/users/felixdoerre/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T02:34:28Z","updated_at":"2015-06-03T02:34:28Z","body":"I am not sure, if RFC 6120 (4.9.1.1) refers to such errors, because these are not XML-errors, but XML-content errors. When the XML-stream is malformed I am totally with you.\r\n\r\nFor presence stanzas I see your point.\r\n\r\nBut faulty \"extensions\" should not cause the hole package to be invalid. These are extensions, and a broken extension in a message should not make the whole message unparsable. Clients should at least be able to display the plain message instead of totally discarding the message. (And instead of closing the stream). Why should this behaviour be bad?"}}