{"action":"created","comment":{"url":"https://api.github.com/repos/mammon-ircd/mammon/pulls/comments/51342828","id":51342828,"diff_hunk":"@@ -40,23 +40,45 @@ def m_AUTHENTICATE(cli, ev_msg):\n     if len(ev_msg['params']) == 1 and ev_msg['params'][0] == '*':\n         if getattr(cli, 'sasl', None):\n             cli.dump_numeric('906', ['SASL authentication aborted'])\n-            cli.sasl = None\n         else:\n             cli.dump_numeric('904', ['SASL authentication failed'])\n+        cli.sasl = None\n+        cli.sasl_tmp = ''\n         return\n \n     if getattr(cli, 'sasl', None):\n-        if len(ev_msg['params'][0]) > 400:\n+        raw_data = ev_msg['params'][0]\n+\n+        if len(raw_data) > 400:\n             cli.dump_numeric('905', ['SASL message too long'])\n             cli.sasl = None\n+            cli.sasl_tmp = ''\n+            return\n+        elif len(raw_data) == 400:\n+            if not hasattr(cli, 'sasl_tmp'):\n+                cli.sasl_tmp = ''\n+            cli.sasl_tmp += raw_data\n+            # allow 4 'continuation' lines before rejecting for length\n+            if len(cli.sasl_tmp) > 400 * 4:","path":"mammon/ext/ircv3/sasl.py","position":25,"original_position":25,"commit_id":"f9d4ed82df2d10a2ae51dc8afb59e50d9d184514","original_commit_id":"f9d4ed82df2d10a2ae51dc8afb59e50d9d184514","user":{"login":"ProgVal","id":406946,"avatar_url":"https://avatars.githubusercontent.com/u/406946?v=3","gravatar_id":"","url":"https://api.github.com/users/ProgVal","html_url":"https://github.com/ProgVal","followers_url":"https://api.github.com/users/ProgVal/followers","following_url":"https://api.github.com/users/ProgVal/following{/other_user}","gists_url":"https://api.github.com/users/ProgVal/gists{/gist_id}","starred_url":"https://api.github.com/users/ProgVal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProgVal/subscriptions","organizations_url":"https://api.github.com/users/ProgVal/orgs","repos_url":"https://api.github.com/users/ProgVal/repos","events_url":"https://api.github.com/users/ProgVal/events{/privacy}","received_events_url":"https://api.github.com/users/ProgVal/received_events","type":"User","site_admin":false},"body":"Could you make this configurable?","created_at":"2016-01-30T09:18:39Z","updated_at":"2016-01-30T09:18:39Z","html_url":"https://github.com/mammon-ircd/mammon/pull/89#discussion_r51342828","pull_request_url":"https://api.github.com/repos/mammon-ircd/mammon/pulls/89","_links":{"self":{"href":"https://api.github.com/repos/mammon-ircd/mammon/pulls/comments/51342828"},"html":{"href":"https://github.com/mammon-ircd/mammon/pull/89#discussion_r51342828"},"pull_request":{"href":"https://api.github.com/repos/mammon-ircd/mammon/pulls/89"}}},"pull_request":{"url":"https://api.github.com/repos/mammon-ircd/mammon/pulls/89","id":57734607,"html_url":"https://github.com/mammon-ircd/mammon/pull/89","diff_url":"https://github.com/mammon-ircd/mammon/pull/89.diff","patch_url":"https://github.com/mammon-ircd/mammon/pull/89.patch","issue_url":"https://api.github.com/repos/mammon-ircd/mammon/issues/89","number":89,"state":"open","locked":false,"title":"mammon.ext.ircv3.sasl: Allow 400-length continuation lines","user":{"login":"DanielOaks","id":251281,"avatar_url":"https://avatars.githubusercontent.com/u/251281?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielOaks","html_url":"https://github.com/DanielOaks","followers_url":"https://api.github.com/users/DanielOaks/followers","following_url":"https://api.github.com/users/DanielOaks/following{/other_user}","gists_url":"https://api.github.com/users/DanielOaks/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielOaks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielOaks/subscriptions","organizations_url":"https://api.github.com/users/DanielOaks/orgs","repos_url":"https://api.github.com/users/DanielOaks/repos","events_url":"https://api.github.com/users/DanielOaks/events{/privacy}","received_events_url":"https://api.github.com/users/DanielOaks/received_events","type":"User","site_admin":false},"body":"This lets the `AUTHENTICATE` command accept the 400-length continuation lines. This allows four 400-length lines and one more line (either just a `+` or the rest of the password).\r\n\r\nIf they send more 400-length lines after those first four, it will reject it for length. We can change that without too much trouble, but it's probably good to limit it to stop it from just endlessly growing.\r\n\r\nFixes #87 and #70.\r\n\r\nAlso threw in a small fix in `m_sasl_plain` to dump `904` when they send an invalid line.","created_at":"2016-01-30T08:44:28Z","updated_at":"2016-01-30T09:18:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e20684ea74ac41b78fe0c4df6c2435d395817328","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mammon-ircd/mammon/pulls/89/commits","review_comments_url":"https://api.github.com/repos/mammon-ircd/mammon/pulls/89/comments","review_comment_url":"https://api.github.com/repos/mammon-ircd/mammon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mammon-ircd/mammon/issues/89/comments","statuses_url":"https://api.github.com/repos/mammon-ircd/mammon/statuses/f9d4ed82df2d10a2ae51dc8afb59e50d9d184514","head":{"label":"DanielOaks:sasl-allow-continuation","ref":"sasl-allow-continuation","sha":"f9d4ed82df2d10a2ae51dc8afb59e50d9d184514","user":{"login":"DanielOaks","id":251281,"avatar_url":"https://avatars.githubusercontent.com/u/251281?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielOaks","html_url":"https://github.com/DanielOaks","followers_url":"https://api.github.com/users/DanielOaks/followers","following_url":"https://api.github.com/users/DanielOaks/following{/other_user}","gists_url":"https://api.github.com/users/DanielOaks/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielOaks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielOaks/subscriptions","organizations_url":"https://api.github.com/users/DanielOaks/orgs","repos_url":"https://api.github.com/users/DanielOaks/repos","events_url":"https://api.github.com/users/DanielOaks/events{/privacy}","received_events_url":"https://api.github.com/users/DanielOaks/received_events","type":"User","site_admin":false},"repo":{"id":32668475,"name":"mammon","full_name":"DanielOaks/mammon","owner":{"login":"DanielOaks","id":251281,"avatar_url":"https://avatars.githubusercontent.com/u/251281?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielOaks","html_url":"https://github.com/DanielOaks","followers_url":"https://api.github.com/users/DanielOaks/followers","following_url":"https://api.github.com/users/DanielOaks/following{/other_user}","gists_url":"https://api.github.com/users/DanielOaks/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielOaks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielOaks/subscriptions","organizations_url":"https://api.github.com/users/DanielOaks/orgs","repos_url":"https://api.github.com/users/DanielOaks/repos","events_url":"https://api.github.com/users/DanielOaks/events{/privacy}","received_events_url":"https://api.github.com/users/DanielOaks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DanielOaks/mammon","description":"legacy-free IRCv3.2 server built ontop of ircreactor","fork":true,"url":"https://api.github.com/repos/DanielOaks/mammon","forks_url":"https://api.github.com/repos/DanielOaks/mammon/forks","keys_url":"https://api.github.com/repos/DanielOaks/mammon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DanielOaks/mammon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DanielOaks/mammon/teams","hooks_url":"https://api.github.com/repos/DanielOaks/mammon/hooks","issue_events_url":"https://api.github.com/repos/DanielOaks/mammon/issues/events{/number}","events_url":"https://api.github.com/repos/DanielOaks/mammon/events","assignees_url":"https://api.github.com/repos/DanielOaks/mammon/assignees{/user}","branches_url":"https://api.github.com/repos/DanielOaks/mammon/branches{/branch}","tags_url":"https://api.github.com/repos/DanielOaks/mammon/tags","blobs_url":"https://api.github.com/repos/DanielOaks/mammon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DanielOaks/mammon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DanielOaks/mammon/git/refs{/sha}","trees_url":"https://api.github.com/repos/DanielOaks/mammon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DanielOaks/mammon/statuses/{sha}","languages_url":"https://api.github.com/repos/DanielOaks/mammon/languages","stargazers_url":"https://api.github.com/repos/DanielOaks/mammon/stargazers","contributors_url":"https://api.github.com/repos/DanielOaks/mammon/contributors","subscribers_url":"https://api.github.com/repos/DanielOaks/mammon/subscribers","subscription_url":"https://api.github.com/repos/DanielOaks/mammon/subscription","commits_url":"https://api.github.com/repos/DanielOaks/mammon/commits{/sha}","git_commits_url":"https://api.github.com/repos/DanielOaks/mammon/git/commits{/sha}","comments_url":"https://api.github.com/repos/DanielOaks/mammon/comments{/number}","issue_comment_url":"https://api.github.com/repos/DanielOaks/mammon/issues/comments{/number}","contents_url":"https://api.github.com/repos/DanielOaks/mammon/contents/{+path}","compare_url":"https://api.github.com/repos/DanielOaks/mammon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DanielOaks/mammon/merges","archive_url":"https://api.github.com/repos/DanielOaks/mammon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DanielOaks/mammon/downloads","issues_url":"https://api.github.com/repos/DanielOaks/mammon/issues{/number}","pulls_url":"https://api.github.com/repos/DanielOaks/mammon/pulls{/number}","milestones_url":"https://api.github.com/repos/DanielOaks/mammon/milestones{/number}","notifications_url":"https://api.github.com/repos/DanielOaks/mammon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DanielOaks/mammon/labels{/name}","releases_url":"https://api.github.com/repos/DanielOaks/mammon/releases{/id}","deployments_url":"https://api.github.com/repos/DanielOaks/mammon/deployments","created_at":"2015-03-22T08:51:14Z","updated_at":"2015-04-14T19:53:58Z","pushed_at":"2016-01-30T08:40:41Z","git_url":"git://github.com/DanielOaks/mammon.git","ssh_url":"git@github.com:DanielOaks/mammon.git","clone_url":"https://github.com/DanielOaks/mammon.git","svn_url":"https://github.com/DanielOaks/mammon","homepage":"http://mammon.dereferenced.org/","size":281,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"mammon-ircd:master","ref":"master","sha":"46469d75ba49d6099767c4ddaac55501c0eb8a5e","user":{"login":"mammon-ircd","id":11745720,"avatar_url":"https://avatars.githubusercontent.com/u/11745720?v=3","gravatar_id":"","url":"https://api.github.com/users/mammon-ircd","html_url":"https://github.com/mammon-ircd","followers_url":"https://api.github.com/users/mammon-ircd/followers","following_url":"https://api.github.com/users/mammon-ircd/following{/other_user}","gists_url":"https://api.github.com/users/mammon-ircd/gists{/gist_id}","starred_url":"https://api.github.com/users/mammon-ircd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mammon-ircd/subscriptions","organizations_url":"https://api.github.com/users/mammon-ircd/orgs","repos_url":"https://api.github.com/users/mammon-ircd/repos","events_url":"https://api.github.com/users/mammon-ircd/events{/privacy}","received_events_url":"https://api.github.com/users/mammon-ircd/received_events","type":"Organization","site_admin":false},"repo":{"id":28769114,"name":"mammon","full_name":"mammon-ircd/mammon","owner":{"login":"mammon-ircd","id":11745720,"avatar_url":"https://avatars.githubusercontent.com/u/11745720?v=3","gravatar_id":"","url":"https://api.github.com/users/mammon-ircd","html_url":"https://github.com/mammon-ircd","followers_url":"https://api.github.com/users/mammon-ircd/followers","following_url":"https://api.github.com/users/mammon-ircd/following{/other_user}","gists_url":"https://api.github.com/users/mammon-ircd/gists{/gist_id}","starred_url":"https://api.github.com/users/mammon-ircd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mammon-ircd/subscriptions","organizations_url":"https://api.github.com/users/mammon-ircd/orgs","repos_url":"https://api.github.com/users/mammon-ircd/repos","events_url":"https://api.github.com/users/mammon-ircd/events{/privacy}","received_events_url":"https://api.github.com/users/mammon-ircd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mammon-ircd/mammon","description":"legacy-free IRCv3.2 server built ontop of ircreactor","fork":false,"url":"https://api.github.com/repos/mammon-ircd/mammon","forks_url":"https://api.github.com/repos/mammon-ircd/mammon/forks","keys_url":"https://api.github.com/repos/mammon-ircd/mammon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mammon-ircd/mammon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mammon-ircd/mammon/teams","hooks_url":"https://api.github.com/repos/mammon-ircd/mammon/hooks","issue_events_url":"https://api.github.com/repos/mammon-ircd/mammon/issues/events{/number}","events_url":"https://api.github.com/repos/mammon-ircd/mammon/events","assignees_url":"https://api.github.com/repos/mammon-ircd/mammon/assignees{/user}","branches_url":"https://api.github.com/repos/mammon-ircd/mammon/branches{/branch}","tags_url":"https://api.github.com/repos/mammon-ircd/mammon/tags","blobs_url":"https://api.github.com/repos/mammon-ircd/mammon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mammon-ircd/mammon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mammon-ircd/mammon/git/refs{/sha}","trees_url":"https://api.github.com/repos/mammon-ircd/mammon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mammon-ircd/mammon/statuses/{sha}","languages_url":"https://api.github.com/repos/mammon-ircd/mammon/languages","stargazers_url":"https://api.github.com/repos/mammon-ircd/mammon/stargazers","contributors_url":"https://api.github.com/repos/mammon-ircd/mammon/contributors","subscribers_url":"https://api.github.com/repos/mammon-ircd/mammon/subscribers","subscription_url":"https://api.github.com/repos/mammon-ircd/mammon/subscription","commits_url":"https://api.github.com/repos/mammon-ircd/mammon/commits{/sha}","git_commits_url":"https://api.github.com/repos/mammon-ircd/mammon/git/commits{/sha}","comments_url":"https://api.github.com/repos/mammon-ircd/mammon/comments{/number}","issue_comment_url":"https://api.github.com/repos/mammon-ircd/mammon/issues/comments{/number}","contents_url":"https://api.github.com/repos/mammon-ircd/mammon/contents/{+path}","compare_url":"https://api.github.com/repos/mammon-ircd/mammon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mammon-ircd/mammon/merges","archive_url":"https://api.github.com/repos/mammon-ircd/mammon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mammon-ircd/mammon/downloads","issues_url":"https://api.github.com/repos/mammon-ircd/mammon/issues{/number}","pulls_url":"https://api.github.com/repos/mammon-ircd/mammon/pulls{/number}","milestones_url":"https://api.github.com/repos/mammon-ircd/mammon/milestones{/number}","notifications_url":"https://api.github.com/repos/mammon-ircd/mammon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mammon-ircd/mammon/labels{/name}","releases_url":"https://api.github.com/repos/mammon-ircd/mammon/releases{/id}","deployments_url":"https://api.github.com/repos/mammon-ircd/mammon/deployments","created_at":"2015-01-04T08:41:50Z","updated_at":"2016-01-28T18:15:39Z","pushed_at":"2016-01-30T08:44:28Z","git_url":"git://github.com/mammon-ircd/mammon.git","ssh_url":"git@github.com:mammon-ircd/mammon.git","clone_url":"https://github.com/mammon-ircd/mammon.git","svn_url":"https://github.com/mammon-ircd/mammon","homepage":"http://www.mammon.io/","size":270,"stargazers_count":26,"watchers_count":26,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":23,"forks":8,"open_issues":23,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mammon-ircd/mammon/pulls/89"},"html":{"href":"https://github.com/mammon-ircd/mammon/pull/89"},"issue":{"href":"https://api.github.com/repos/mammon-ircd/mammon/issues/89"},"comments":{"href":"https://api.github.com/repos/mammon-ircd/mammon/issues/89/comments"},"review_comments":{"href":"https://api.github.com/repos/mammon-ircd/mammon/pulls/89/comments"},"review_comment":{"href":"https://api.github.com/repos/mammon-ircd/mammon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mammon-ircd/mammon/pulls/89/commits"},"statuses":{"href":"https://api.github.com/repos/mammon-ircd/mammon/statuses/f9d4ed82df2d10a2ae51dc8afb59e50d9d184514"}}}}