{"action":"closed","number":3290,"pull_request":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/3290","id":14998516,"html_url":"https://github.com/rapid7/metasploit-framework/pull/3290","diff_url":"https://github.com/rapid7/metasploit-framework/pull/3290.diff","patch_url":"https://github.com/rapid7/metasploit-framework/pull/3290.patch","issue_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/3290","number":3290,"state":"closed","locked":false,"title":"Convert keys to symbols (fix encoding issue)","user":{"login":"allfro","id":618125,"avatar_url":"https://avatars.githubusercontent.com/u/618125?v=3","gravatar_id":"","url":"https://api.github.com/users/allfro","html_url":"https://github.com/allfro","followers_url":"https://api.github.com/users/allfro/followers","following_url":"https://api.github.com/users/allfro/following{/other_user}","gists_url":"https://api.github.com/users/allfro/gists{/gist_id}","starred_url":"https://api.github.com/users/allfro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allfro/subscriptions","organizations_url":"https://api.github.com/users/allfro/orgs","repos_url":"https://api.github.com/users/allfro/repos","events_url":"https://api.github.com/users/allfro/events{/privacy}","received_events_url":"https://api.github.com/users/allfro/received_events","type":"User","site_admin":false},"body":"Another encoding issue is causing the retrieval of keys in create_db to fail. The reason is associated with the way ruby decides to inconsistently encode strings when processing strings from different I/O channels. In this case, when a user attempts to call the db.connect command via RPC, the creation of the database fails because `opt['database']` returns `nil`. This patch converts all keys in `opts` to symbols and gets rid of dealing with encoding. It might be better (not sure because I am not a ruby expert) to use this technique for the entire framework as this encoding issue has crept up in the past.  This solution has been tested on both msfconsole and msfrpcd and appears to work consistently.","created_at":"2014-04-22T06:28:02Z","updated_at":"2015-01-10T05:27:58Z","closed_at":"2015-01-10T05:27:58Z","merged_at":null,"merge_commit_sha":"a40330cdf1dcdb94a12110d48b150379117a9d77","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/3290/commits","review_comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/3290/comments","review_comment_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/3290/comments","statuses_url":"https://api.github.com/repos/rapid7/metasploit-framework/statuses/37e0085d6a6733955eb0ac81ff4a0a2d4b0a51f7","head":{"label":"allfro:master","ref":"master","sha":"37e0085d6a6733955eb0ac81ff4a0a2d4b0a51f7","user":{"login":"allfro","id":618125,"avatar_url":"https://avatars.githubusercontent.com/u/618125?v=3","gravatar_id":"","url":"https://api.github.com/users/allfro","html_url":"https://github.com/allfro","followers_url":"https://api.github.com/users/allfro/followers","following_url":"https://api.github.com/users/allfro/following{/other_user}","gists_url":"https://api.github.com/users/allfro/gists{/gist_id}","starred_url":"https://api.github.com/users/allfro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allfro/subscriptions","organizations_url":"https://api.github.com/users/allfro/orgs","repos_url":"https://api.github.com/users/allfro/repos","events_url":"https://api.github.com/users/allfro/events{/privacy}","received_events_url":"https://api.github.com/users/allfro/received_events","type":"User","site_admin":false},"repo":{"id":19019179,"name":"metasploit-framework","full_name":"allfro/metasploit-framework","owner":{"login":"allfro","id":618125,"avatar_url":"https://avatars.githubusercontent.com/u/618125?v=3","gravatar_id":"","url":"https://api.github.com/users/allfro","html_url":"https://github.com/allfro","followers_url":"https://api.github.com/users/allfro/followers","following_url":"https://api.github.com/users/allfro/following{/other_user}","gists_url":"https://api.github.com/users/allfro/gists{/gist_id}","starred_url":"https://api.github.com/users/allfro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allfro/subscriptions","organizations_url":"https://api.github.com/users/allfro/orgs","repos_url":"https://api.github.com/users/allfro/repos","events_url":"https://api.github.com/users/allfro/events{/privacy}","received_events_url":"https://api.github.com/users/allfro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/allfro/metasploit-framework","description":"Metasploit Framework","fork":true,"url":"https://api.github.com/repos/allfro/metasploit-framework","forks_url":"https://api.github.com/repos/allfro/metasploit-framework/forks","keys_url":"https://api.github.com/repos/allfro/metasploit-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/allfro/metasploit-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/allfro/metasploit-framework/teams","hooks_url":"https://api.github.com/repos/allfro/metasploit-framework/hooks","issue_events_url":"https://api.github.com/repos/allfro/metasploit-framework/issues/events{/number}","events_url":"https://api.github.com/repos/allfro/metasploit-framework/events","assignees_url":"https://api.github.com/repos/allfro/metasploit-framework/assignees{/user}","branches_url":"https://api.github.com/repos/allfro/metasploit-framework/branches{/branch}","tags_url":"https://api.github.com/repos/allfro/metasploit-framework/tags","blobs_url":"https://api.github.com/repos/allfro/metasploit-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/allfro/metasploit-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/allfro/metasploit-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/allfro/metasploit-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/allfro/metasploit-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/allfro/metasploit-framework/languages","stargazers_url":"https://api.github.com/repos/allfro/metasploit-framework/stargazers","contributors_url":"https://api.github.com/repos/allfro/metasploit-framework/contributors","subscribers_url":"https://api.github.com/repos/allfro/metasploit-framework/subscribers","subscription_url":"https://api.github.com/repos/allfro/metasploit-framework/subscription","commits_url":"https://api.github.com/repos/allfro/metasploit-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/allfro/metasploit-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/allfro/metasploit-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/allfro/metasploit-framework/issues/comments/{number}","contents_url":"https://api.github.com/repos/allfro/metasploit-framework/contents/{+path}","compare_url":"https://api.github.com/repos/allfro/metasploit-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/allfro/metasploit-framework/merges","archive_url":"https://api.github.com/repos/allfro/metasploit-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/allfro/metasploit-framework/downloads","issues_url":"https://api.github.com/repos/allfro/metasploit-framework/issues{/number}","pulls_url":"https://api.github.com/repos/allfro/metasploit-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/allfro/metasploit-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/allfro/metasploit-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/allfro/metasploit-framework/labels{/name}","releases_url":"https://api.github.com/repos/allfro/metasploit-framework/releases{/id}","created_at":"2014-04-22T06:14:25Z","updated_at":"2014-04-22T06:28:02Z","pushed_at":"2014-04-22T06:25:51Z","git_url":"git://github.com/allfro/metasploit-framework.git","ssh_url":"git@github.com:allfro/metasploit-framework.git","clone_url":"https://github.com/allfro/metasploit-framework.git","svn_url":"https://github.com/allfro/metasploit-framework","homepage":"http://www.metasploit.com/","size":232146,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":0,"default_branch":"master"}},"base":{"label":"rapid7:master","ref":"master","sha":"284b474591c27766fa2abf2209519006fed68240","user":{"login":"rapid7","id":1013671,"avatar_url":"https://avatars.githubusercontent.com/u/1013671?v=3","gravatar_id":"","url":"https://api.github.com/users/rapid7","html_url":"https://github.com/rapid7","followers_url":"https://api.github.com/users/rapid7/followers","following_url":"https://api.github.com/users/rapid7/following{/other_user}","gists_url":"https://api.github.com/users/rapid7/gists{/gist_id}","starred_url":"https://api.github.com/users/rapid7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapid7/subscriptions","organizations_url":"https://api.github.com/users/rapid7/orgs","repos_url":"https://api.github.com/users/rapid7/repos","events_url":"https://api.github.com/users/rapid7/events{/privacy}","received_events_url":"https://api.github.com/users/rapid7/received_events","type":"Organization","site_admin":false},"repo":{"id":2293158,"name":"metasploit-framework","full_name":"rapid7/metasploit-framework","owner":{"login":"rapid7","id":1013671,"avatar_url":"https://avatars.githubusercontent.com/u/1013671?v=3","gravatar_id":"","url":"https://api.github.com/users/rapid7","html_url":"https://github.com/rapid7","followers_url":"https://api.github.com/users/rapid7/followers","following_url":"https://api.github.com/users/rapid7/following{/other_user}","gists_url":"https://api.github.com/users/rapid7/gists{/gist_id}","starred_url":"https://api.github.com/users/rapid7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapid7/subscriptions","organizations_url":"https://api.github.com/users/rapid7/orgs","repos_url":"https://api.github.com/users/rapid7/repos","events_url":"https://api.github.com/users/rapid7/events{/privacy}","received_events_url":"https://api.github.com/users/rapid7/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rapid7/metasploit-framework","description":"Metasploit Framework","fork":false,"url":"https://api.github.com/repos/rapid7/metasploit-framework","forks_url":"https://api.github.com/repos/rapid7/metasploit-framework/forks","keys_url":"https://api.github.com/repos/rapid7/metasploit-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rapid7/metasploit-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rapid7/metasploit-framework/teams","hooks_url":"https://api.github.com/repos/rapid7/metasploit-framework/hooks","issue_events_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/events{/number}","events_url":"https://api.github.com/repos/rapid7/metasploit-framework/events","assignees_url":"https://api.github.com/repos/rapid7/metasploit-framework/assignees{/user}","branches_url":"https://api.github.com/repos/rapid7/metasploit-framework/branches{/branch}","tags_url":"https://api.github.com/repos/rapid7/metasploit-framework/tags","blobs_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rapid7/metasploit-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/rapid7/metasploit-framework/languages","stargazers_url":"https://api.github.com/repos/rapid7/metasploit-framework/stargazers","contributors_url":"https://api.github.com/repos/rapid7/metasploit-framework/contributors","subscribers_url":"https://api.github.com/repos/rapid7/metasploit-framework/subscribers","subscription_url":"https://api.github.com/repos/rapid7/metasploit-framework/subscription","commits_url":"https://api.github.com/repos/rapid7/metasploit-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/comments/{number}","contents_url":"https://api.github.com/repos/rapid7/metasploit-framework/contents/{+path}","compare_url":"https://api.github.com/repos/rapid7/metasploit-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rapid7/metasploit-framework/merges","archive_url":"https://api.github.com/repos/rapid7/metasploit-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rapid7/metasploit-framework/downloads","issues_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues{/number}","pulls_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/rapid7/metasploit-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/rapid7/metasploit-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rapid7/metasploit-framework/labels{/name}","releases_url":"https://api.github.com/repos/rapid7/metasploit-framework/releases{/id}","created_at":"2011-08-30T06:13:20Z","updated_at":"2015-01-10T05:00:32Z","pushed_at":"2015-01-10T05:00:32Z","git_url":"git://github.com/rapid7/metasploit-framework.git","ssh_url":"git@github.com:rapid7/metasploit-framework.git","clone_url":"https://github.com/rapid7/metasploit-framework.git","svn_url":"https://github.com/rapid7/metasploit-framework","homepage":"http://www.metasploit.com/","size":1055283,"stargazers_count":3160,"watchers_count":3160,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2683,"mirror_url":null,"open_issues_count":194,"forks":2683,"open_issues":194,"watchers":3160,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/3290"},"html":{"href":"https://github.com/rapid7/metasploit-framework/pull/3290"},"issue":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/issues/3290"},"comments":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/issues/3290/comments"},"review_comments":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/3290/comments"},"review_comment":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/3290/commits"},"statuses":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/statuses/37e0085d6a6733955eb0ac81ff4a0a2d4b0a51f7"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":8,"review_comments":0,"commits":1,"additions":4,"deletions":3,"changed_files":1}}