{"action":"created","issue":{"url":"https://api.github.com/repos/andreasgal/j2me.js/issues/984","labels_url":"https://api.github.com/repos/andreasgal/j2me.js/issues/984/labels{/name}","comments_url":"https://api.github.com/repos/andreasgal/j2me.js/issues/984/comments","events_url":"https://api.github.com/repos/andreasgal/j2me.js/issues/984/events","html_url":"https://github.com/andreasgal/j2me.js/issues/984","id":56041004,"number":984,"title":"Disallow non-HTTP(s) URLs for `windowOpen`","user":{"login":"mozfreddyb","id":5418775,"avatar_url":"https://avatars.githubusercontent.com/u/5418775?v=3","gravatar_id":"","url":"https://api.github.com/users/mozfreddyb","html_url":"https://github.com/mozfreddyb","followers_url":"https://api.github.com/users/mozfreddyb/followers","following_url":"https://api.github.com/users/mozfreddyb/following{/other_user}","gists_url":"https://api.github.com/users/mozfreddyb/gists{/gist_id}","starred_url":"https://api.github.com/users/mozfreddyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozfreddyb/subscriptions","organizations_url":"https://api.github.com/users/mozfreddyb/orgs","repos_url":"https://api.github.com/users/mozfreddyb/repos","events_url":"https://api.github.com/users/mozfreddyb/events{/privacy}","received_events_url":"https://api.github.com/users/mozfreddyb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-30T14:42:00Z","updated_at":"2015-01-30T14:43:22Z","closed_at":null,"body":"For defense in depth I would recommend the windowOpen handler to check URLs and only allow those that point to the web. This could be problematic with blob or app URLs.\r\ncf. index.js line ~524, `DumbPipe.registerOpener(\"windowOpen\", function(message, sender) {` "},"comment":{"url":"https://api.github.com/repos/andreasgal/j2me.js/issues/comments/72211000","html_url":"https://github.com/andreasgal/j2me.js/issues/984#issuecomment-72211000","issue_url":"https://api.github.com/repos/andreasgal/j2me.js/issues/984","id":72211000,"user":{"login":"mozfreddyb","id":5418775,"avatar_url":"https://avatars.githubusercontent.com/u/5418775?v=3","gravatar_id":"","url":"https://api.github.com/users/mozfreddyb","html_url":"https://github.com/mozfreddyb","followers_url":"https://api.github.com/users/mozfreddyb/followers","following_url":"https://api.github.com/users/mozfreddyb/following{/other_user}","gists_url":"https://api.github.com/users/mozfreddyb/gists{/gist_id}","starred_url":"https://api.github.com/users/mozfreddyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozfreddyb/subscriptions","organizations_url":"https://api.github.com/users/mozfreddyb/orgs","repos_url":"https://api.github.com/users/mozfreddyb/repos","events_url":"https://api.github.com/users/mozfreddyb/events{/privacy}","received_events_url":"https://api.github.com/users/mozfreddyb/received_events","type":"User","site_admin":false},"created_at":"2015-01-30T14:43:22Z","updated_at":"2015-01-30T14:43:22Z","body":"I noticed that there's only one caller for the `windowOpen` handler, which already does this checking.\r\n\r\nIt would make sense to move the checks to the handler, in case future code uses it, but this is really just a minor enhancement now. Sorry for the confusion."}}