{"action":"created","issue":{"url":"https://api.github.com/repos/whiteout-io/imap-handler/issues/9","labels_url":"https://api.github.com/repos/whiteout-io/imap-handler/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/whiteout-io/imap-handler/issues/9/comments","events_url":"https://api.github.com/repos/whiteout-io/imap-handler/issues/9/events","html_url":"https://github.com/whiteout-io/imap-handler/pull/9","id":54871840,"number":9,"title":"Do not die on COPYUID response code and friends","user":{"login":"asutherland","id":212206,"avatar_url":"https://avatars.githubusercontent.com/u/212206?v=3","gravatar_id":"","url":"https://api.github.com/users/asutherland","html_url":"https://github.com/asutherland","followers_url":"https://api.github.com/users/asutherland/followers","following_url":"https://api.github.com/users/asutherland/following{/other_user}","gists_url":"https://api.github.com/users/asutherland/gists{/gist_id}","starred_url":"https://api.github.com/users/asutherland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asutherland/subscriptions","organizations_url":"https://api.github.com/users/asutherland/orgs","repos_url":"https://api.github.com/users/asutherland/repos","events_url":"https://api.github.com/users/asutherland/events{/privacy}","received_events_url":"https://api.github.com/users/asutherland/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-20T11:25:12Z","updated_at":"2015-01-20T15:46:32Z","closed_at":"2015-01-20T15:26:56Z","pull_request":{"url":"https://api.github.com/repos/whiteout-io/imap-handler/pulls/9","html_url":"https://github.com/whiteout-io/imap-handler/pull/9","diff_url":"https://github.com/whiteout-io/imap-handler/pull/9.diff","patch_url":"https://github.com/whiteout-io/imap-handler/pull/9.patch"},"body":"Parsing a COPYUID response where the uid-set was interpreted as a SEQUENCE\r\nwould throw a parse error when it hit the \"]\".  I've addressed this\r\ntransition.\r\n\r\nIn order to avoid more surprises like this, I've also gone through all the\r\nRFCs referenced by the IMAP Response Codes IANA registry at\r\nhttp://www.iana.org/assignments/imap-response-codes/imap-response-codes.xhtml\r\nand added additional test coverage for the interesting variants I found.\r\n\r\nThe only case that was broken is the horrible REFERRAL response code whose\r\npayload is an IMAPURL that can look like IMAP://user;AUTH=*@SERVER2/ or\r\nworse.  Although it's still not clear that imap-handler throwing fatal\r\nexceptions when it encounters input it doesn't like is desirable, I felt\r\nthat totally removing all the ATOM protections was probably not the right\r\nway to address this one.  So I special-cased REFERRAL to simply slurp the\r\nremainder of the response code up to the ].\r\n\r\nExtra PR-only comments: Feel free to refactor this or clean it up or do whatever.  I do care about COPYUID.  I don't care about REFERRAL as much, but it would be nice for imap-handler to not explode in that case."},"comment":{"url":"https://api.github.com/repos/whiteout-io/imap-handler/issues/comments/70674756","html_url":"https://github.com/whiteout-io/imap-handler/pull/9#issuecomment-70674756","issue_url":"https://api.github.com/repos/whiteout-io/imap-handler/issues/9","id":70674756,"user":{"login":"andris9","id":132242,"avatar_url":"https://avatars.githubusercontent.com/u/132242?v=3","gravatar_id":"","url":"https://api.github.com/users/andris9","html_url":"https://github.com/andris9","followers_url":"https://api.github.com/users/andris9/followers","following_url":"https://api.github.com/users/andris9/following{/other_user}","gists_url":"https://api.github.com/users/andris9/gists{/gist_id}","starred_url":"https://api.github.com/users/andris9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andris9/subscriptions","organizations_url":"https://api.github.com/users/andris9/orgs","repos_url":"https://api.github.com/users/andris9/repos","events_url":"https://api.github.com/users/andris9/events{/privacy}","received_events_url":"https://api.github.com/users/andris9/received_events","type":"User","site_admin":false},"created_at":"2015-01-20T15:46:32Z","updated_at":"2015-01-20T15:46:32Z","body":"Seems OK to me. The REFERRAL seems pretty awful, are there actually servers out there that support this or is it a thing from the past?"}}