{"action":"created","issue":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/4647","labels_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/4647/labels{/name}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/4647/comments","events_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/4647/events","html_url":"https://github.com/rapid7/metasploit-framework/pull/4647","id":55580879,"number":4647,"title":"Fix #4646 - get_module_resource should check nil before using get_resource","user":{"login":"wchen-r7","id":1170914,"avatar_url":"https://avatars.githubusercontent.com/u/1170914?v=3","gravatar_id":"","url":"https://api.github.com/users/wchen-r7","html_url":"https://github.com/wchen-r7","followers_url":"https://api.github.com/users/wchen-r7/followers","following_url":"https://api.github.com/users/wchen-r7/following{/other_user}","gists_url":"https://api.github.com/users/wchen-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/wchen-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wchen-r7/subscriptions","organizations_url":"https://api.github.com/users/wchen-r7/orgs","repos_url":"https://api.github.com/users/wchen-r7/repos","events_url":"https://api.github.com/users/wchen-r7/events{/privacy}","received_events_url":"https://api.github.com/users/wchen-r7/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/library","name":"library","color":"fad8c7"},{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/newbie%20friendly","name":"newbie friendly","color":"aaaaaa"}],"state":"open","locked":false,"assignee":{"login":"wvu-r7","id":4551878,"avatar_url":"https://avatars.githubusercontent.com/u/4551878?v=3","gravatar_id":"","url":"https://api.github.com/users/wvu-r7","html_url":"https://github.com/wvu-r7","followers_url":"https://api.github.com/users/wvu-r7/followers","following_url":"https://api.github.com/users/wvu-r7/following{/other_user}","gists_url":"https://api.github.com/users/wvu-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/wvu-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wvu-r7/subscriptions","organizations_url":"https://api.github.com/users/wvu-r7/orgs","repos_url":"https://api.github.com/users/wvu-r7/repos","events_url":"https://api.github.com/users/wvu-r7/events{/privacy}","received_events_url":"https://api.github.com/users/wvu-r7/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-01-27T06:26:11Z","updated_at":"2015-01-27T18:06:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/4647","html_url":"https://github.com/rapid7/metasploit-framework/pull/4647","diff_url":"https://github.com/rapid7/metasploit-framework/pull/4647.diff","patch_url":"https://github.com/rapid7/metasploit-framework/pull/4647.patch"},"body":"Fix #4646. The get_module_resource needs to check nil first before using the get_resource method (from HttpServer)\r\n\r\nSo here's how you can verify this:\r\n\r\n- [x] Open lib/msf/core/exploit/http/server.rb, and then go to line 455: https://github.com/rapid7/metasploit-framework/blob/master/lib/msf/core/exploit/http/server.rb#L455\r\n- [x] As you can see, it's possible #get_resource can return nil\r\n\r\nAnd that's all this path does: it converts nil to a string w/ to_s, that way it can use #chomp safely."},"comment":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/comments/71696569","html_url":"https://github.com/rapid7/metasploit-framework/pull/4647#issuecomment-71696569","issue_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/4647","id":71696569,"user":{"login":"wvu-r7","id":4551878,"avatar_url":"https://avatars.githubusercontent.com/u/4551878?v=3","gravatar_id":"","url":"https://api.github.com/users/wvu-r7","html_url":"https://github.com/wvu-r7","followers_url":"https://api.github.com/users/wvu-r7/followers","following_url":"https://api.github.com/users/wvu-r7/following{/other_user}","gists_url":"https://api.github.com/users/wvu-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/wvu-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wvu-r7/subscriptions","organizations_url":"https://api.github.com/users/wvu-r7/orgs","repos_url":"https://api.github.com/users/wvu-r7/repos","events_url":"https://api.github.com/users/wvu-r7/events{/privacy}","received_events_url":"https://api.github.com/users/wvu-r7/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T18:06:52Z","updated_at":"2015-01-27T18:06:52Z","body":"Nice call with the ```to_s``` instead of some convoluted logic."}}