{"action":"created","issue":{"url":"https://api.github.com/repos/uber/uber-licence/issues/14","repository_url":"https://api.github.com/repos/uber/uber-licence","labels_url":"https://api.github.com/repos/uber/uber-licence/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/uber/uber-licence/issues/14/comments","events_url":"https://api.github.com/repos/uber/uber-licence/issues/14/events","html_url":"https://github.com/uber/uber-licence/issues/14","id":148287312,"number":14,"title":"uber-licence hangs on corrupt header","user":{"login":"dansimau","id":203031,"avatar_url":"https://avatars.githubusercontent.com/u/203031?v=3","gravatar_id":"","url":"https://api.github.com/users/dansimau","html_url":"https://github.com/dansimau","followers_url":"https://api.github.com/users/dansimau/followers","following_url":"https://api.github.com/users/dansimau/following{/other_user}","gists_url":"https://api.github.com/users/dansimau/gists{/gist_id}","starred_url":"https://api.github.com/users/dansimau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dansimau/subscriptions","organizations_url":"https://api.github.com/users/dansimau/orgs","repos_url":"https://api.github.com/users/dansimau/repos","events_url":"https://api.github.com/users/dansimau/events{/privacy}","received_events_url":"https://api.github.com/users/dansimau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-14T08:18:41Z","updated_at":"2016-04-14T17:22:18Z","closed_at":null,"body":"`uber-licence` hangs with certain combinations of characters in the file header.\r\n\r\nFor example, adding or removing a single lowercase character in the licence of a file (on certain lines only!) causes it to hang.\r\n\r\n**To reproduce, run the following:**\r\n\r\n```\r\nmkdir /tmp/1\r\ncd /tmp/1\r\n\r\ncat <<EOF>foo.js\r\n// Copyright (c) 2016 Uber Technologies, Inc.\r\n//\r\n// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n// of this software and associated documentation files (the \"Software\"), to deal\r\n// in the Software without restriction, including without limitation the rights\r\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n// copies of the Software, and to permit persons to whom the Software is\r\n// furnished to do so, subject to the following conditions:\r\n//\r\n// The above copyright notice and this permission notice shall be included in\r\n// all copies or substantial portions of the Software.\r\n//\r\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n// THE SOFTWAREz.\r\n\r\n// foo\r\nEOF\r\n\r\nuber-licence   // hangs\r\n```\r\n\r\nNote in the licence text above, \"SOFTWARE\" at the end is \"SOFTWAREz\".\r\n\r\n@mennopruijssers traced the problem to this line:\r\nhttps://github.com/uber/uber-licence/blob/c973d0932d67da3fa5e64f6abc45af61dfd696a9/license-fixer.js#L125\r\n\r\nIt looks like perhaps the RegExp is hanging."},"comment":{"url":"https://api.github.com/repos/uber/uber-licence/issues/comments/210059837","html_url":"https://github.com/uber/uber-licence/issues/14#issuecomment-210059837","issue_url":"https://api.github.com/repos/uber/uber-licence/issues/14","id":210059837,"user":{"login":"kriskowal","id":60294,"avatar_url":"https://avatars.githubusercontent.com/u/60294?v=3","gravatar_id":"","url":"https://api.github.com/users/kriskowal","html_url":"https://github.com/kriskowal","followers_url":"https://api.github.com/users/kriskowal/followers","following_url":"https://api.github.com/users/kriskowal/following{/other_user}","gists_url":"https://api.github.com/users/kriskowal/gists{/gist_id}","starred_url":"https://api.github.com/users/kriskowal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kriskowal/subscriptions","organizations_url":"https://api.github.com/users/kriskowal/orgs","repos_url":"https://api.github.com/users/kriskowal/repos","events_url":"https://api.github.com/users/kriskowal/events{/privacy}","received_events_url":"https://api.github.com/users/kriskowal/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T17:22:18Z","updated_at":"2016-04-14T17:22:18Z","body":"I’ve pushed #15, which addresses the issue locally. Please verify manually."}}