{"action":"created","issue":{"url":"https://api.github.com/repos/mailgun/talon/issues/168","repository_url":"https://api.github.com/repos/mailgun/talon","labels_url":"https://api.github.com/repos/mailgun/talon/issues/168/labels{/name}","comments_url":"https://api.github.com/repos/mailgun/talon/issues/168/comments","events_url":"https://api.github.com/repos/mailgun/talon/issues/168/events","html_url":"https://github.com/mailgun/talon/issues/168","id":347681953,"node_id":"MDU6SXNzdWUzNDc2ODE5NTM=","number":168,"title":"Quotations parser gets stuck","user":{"login":"Nipsuli","id":4548767,"node_id":"MDQ6VXNlcjQ1NDg3Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/4548767?v=4","gravatar_id":"","url":"https://api.github.com/users/Nipsuli","html_url":"https://github.com/Nipsuli","followers_url":"https://api.github.com/users/Nipsuli/followers","following_url":"https://api.github.com/users/Nipsuli/following{/other_user}","gists_url":"https://api.github.com/users/Nipsuli/gists{/gist_id}","starred_url":"https://api.github.com/users/Nipsuli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nipsuli/subscriptions","organizations_url":"https://api.github.com/users/Nipsuli/orgs","repos_url":"https://api.github.com/users/Nipsuli/repos","events_url":"https://api.github.com/users/Nipsuli/events{/privacy}","received_events_url":"https://api.github.com/users/Nipsuli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-05T09:08:37Z","updated_at":"2018-08-24T05:45:16Z","closed_at":null,"author_association":"NONE","body":"I had a an email where `mark_message_lines` produces following markers:\r\n```\r\n'tetetesssssmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmeetttttttttteteetttttttttteeetttttteeettttteeetttttttttteeettttt'\r\n```\r\n\r\nthat gets completely stuck in `re.finditer('(?<=m)e*((?:t+e*)+)m', markers)` on line 289 in quotations.py\r\n\r\nBasically the regex causes [Catastrophic Backtracking](https://www.regular-expressions.info/catastrophic.html)\r\n\r\n\r\ntalon 1.4.4\r\nPython 3.6.5\r\n[GCC 6.3.0 20170516] on linux"},"comment":{"url":"https://api.github.com/repos/mailgun/talon/issues/comments/415657533","html_url":"https://github.com/mailgun/talon/issues/168#issuecomment-415657533","issue_url":"https://api.github.com/repos/mailgun/talon/issues/168","id":415657533,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTY1NzUzMw==","user":{"login":"Nipsuli","id":4548767,"node_id":"MDQ6VXNlcjQ1NDg3Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/4548767?v=4","gravatar_id":"","url":"https://api.github.com/users/Nipsuli","html_url":"https://github.com/Nipsuli","followers_url":"https://api.github.com/users/Nipsuli/followers","following_url":"https://api.github.com/users/Nipsuli/following{/other_user}","gists_url":"https://api.github.com/users/Nipsuli/gists{/gist_id}","starred_url":"https://api.github.com/users/Nipsuli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nipsuli/subscriptions","organizations_url":"https://api.github.com/users/Nipsuli/orgs","repos_url":"https://api.github.com/users/Nipsuli/repos","events_url":"https://api.github.com/users/Nipsuli/events{/privacy}","received_events_url":"https://api.github.com/users/Nipsuli/received_events","type":"User","site_admin":false},"created_at":"2018-08-24T05:45:16Z","updated_at":"2018-08-24T05:45:16Z","author_association":"NONE","body":"Seems to be in the correct direction. I think the quantifier should be `*` instead of `+` so `(?<=m)e*(t[te]*)m`\r\n\r\n```\r\n>>> re.search('(?<=m)e*((?:t+e*)+)m', 'metetetetetetetem').groups()\r\n('tetetetetetete',)\r\n>>> re.search('(?<=m)e*(t[te]+)m', 'metetetetetetetem').groups()\r\n('tetetetetetete',)\r\n>>> re.search('(?<=m)e*(t[te]*)m', 'metetetetetetetem').groups()\r\n('tetetetetetete',)\r\n>>>\r\n>>> re.search('(?<=m)e*((?:t+e*)+)m', 'mtm').groups()\r\n('t',)\r\n>>> re.search('(?<=m)e*(t[te]+)m', 'mtm').groups()  # AttributeError: 'NoneType' object has no attribute 'groups'\r\n>>> re.search('(?<=m)e*(t[te]*)m', 'mtm').groups()\r\n('t',)\r\n```"}}
{"actor":{"display_login":"Nipsuli"}}