{"action":"closed","issue":{"url":"https://api.github.com/repos/pbogut/recurring_events/issues/17","repository_url":"https://api.github.com/repos/pbogut/recurring_events","labels_url":"https://api.github.com/repos/pbogut/recurring_events/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/pbogut/recurring_events/issues/17/comments","events_url":"https://api.github.com/repos/pbogut/recurring_events/issues/17/events","html_url":"https://github.com/pbogut/recurring_events/issues/17","id":384002824,"node_id":"MDU6SXNzdWUzODQwMDI4MjQ=","number":17,"title":"Some invalid values passed to `take/[2,3]` will crash the VM","user":{"login":"voughtdq","id":1967287,"node_id":"MDQ6VXNlcjE5NjcyODc=","avatar_url":"https://avatars2.githubusercontent.com/u/1967287?v=4","gravatar_id":"","url":"https://api.github.com/users/voughtdq","html_url":"https://github.com/voughtdq","followers_url":"https://api.github.com/users/voughtdq/followers","following_url":"https://api.github.com/users/voughtdq/following{/other_user}","gists_url":"https://api.github.com/users/voughtdq/gists{/gist_id}","starred_url":"https://api.github.com/users/voughtdq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voughtdq/subscriptions","organizations_url":"https://api.github.com/users/voughtdq/orgs","repos_url":"https://api.github.com/users/voughtdq/repos","events_url":"https://api.github.com/users/voughtdq/events{/privacy}","received_events_url":"https://api.github.com/users/voughtdq/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-24T16:32:06Z","updated_at":"2018-11-27T10:16:26Z","closed_at":"2018-11-27T10:16:26Z","author_association":"CONTRIBUTOR","body":"When giving a negative value to `take/[2,3]` like this:\r\n\r\n```\r\nRecurringEvents.take(Date.utc_today(), %{by_day: :monday, freq: :weekly}, -1)\r\n```\r\n\r\nThe function will consume resources until it crashes the VM. \r\n\r\nThe same goes for some invalid values, for example:\r\n\r\n```\r\nRecurringEvents.take(Date.utc_today(), %{by_day: :m, freq: :weekly}, 3)\r\n```\r\n\r\nIt's probably best to raise an exception when bad values are provided. "}}
{"actor":{"display_login":"pbogut"}}