{"action":"created","issue":{"url":"https://api.github.com/repos/electron/electron/issues/7670","repository_url":"https://api.github.com/repos/electron/electron","labels_url":"https://api.github.com/repos/electron/electron/issues/7670/labels{/name}","comments_url":"https://api.github.com/repos/electron/electron/issues/7670/comments","events_url":"https://api.github.com/repos/electron/electron/issues/7670/events","html_url":"https://github.com/electron/electron/issues/7670","id":184033253,"number":7670,"title":"Custom standard schemes should be registered as secure schemes","user":{"login":"pfrazee","id":1270099,"avatar_url":"https://avatars.githubusercontent.com/u/1270099?v=3","gravatar_id":"","url":"https://api.github.com/users/pfrazee","html_url":"https://github.com/pfrazee","followers_url":"https://api.github.com/users/pfrazee/followers","following_url":"https://api.github.com/users/pfrazee/following{/other_user}","gists_url":"https://api.github.com/users/pfrazee/gists{/gist_id}","starred_url":"https://api.github.com/users/pfrazee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfrazee/subscriptions","organizations_url":"https://api.github.com/users/pfrazee/orgs","repos_url":"https://api.github.com/users/pfrazee/repos","events_url":"https://api.github.com/users/pfrazee/events{/privacy}","received_events_url":"https://api.github.com/users/pfrazee/received_events","type":"User","site_admin":false},"labels":[{"id":35575878,"url":"https://api.github.com/repos/electron/electron/labels/bug","name":"bug","color":"fc2929","default":true},{"id":144752898,"url":"https://api.github.com/repos/electron/electron/labels/crash","name":"crash","color":"e11d21","default":false},{"id":144086475,"url":"https://api.github.com/repos/electron/electron/labels/devtools","name":"devtools","color":"fad8c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-19T18:03:08Z","updated_at":"2016-12-12T20:54:05Z","closed_at":null,"body":"- Electron version: 1.4.3\n- Operating system: MacOS 10.12\n\nI created an app demonstrating the issue: https://github.com/pfrazee/electron-bug-securewebviewcrash. Let me know if you have trouble reproducing.\n\nThis occurs around a webview:\n\n``` html\n<webview id=\"theWebview\" src=\"custom://webview.html\" preload=\"./webview-preload.js\"></webview>\n```\n\nThe webview opens a custom protocol, which is registered as follows:\n\n``` js\nprotocol.registerStandardSchemes(['custom'])\napp.on('ready', () => {\n  protocol.registerHttpProtocol('custom', (req, cb) => {\n    cb({ method: 'GET', url: 'http://localhost:12345' })\n  }, () => console.log('Registered \"custom\" protocol'))\n})\nhttp.createServer((req, res) => res.end('Hello, world. This is the webview')).listen(12345)\n```\n\nThe webview has a preload script which registers it as a secure protocol:\n\n``` js\nvar { webFrame } = require('electron')\nwebFrame.registerURLSchemeAsPrivileged('custom')\n```\n\nFor some reason, this combination causes devtools to crash the webview when the Application tab is opened. I used the more fine-grained controls in https://github.com/electron/electron/pull/7665 to isolate this specifically to the \"secure\" flag.\n"},"comment":{"url":"https://api.github.com/repos/electron/electron/issues/comments/266549522","html_url":"https://github.com/electron/electron/issues/7670#issuecomment-266549522","issue_url":"https://api.github.com/repos/electron/electron/issues/7670","id":266549522,"user":{"login":"kevinsawicki","id":671378,"avatar_url":"https://avatars.githubusercontent.com/u/671378?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinsawicki","html_url":"https://github.com/kevinsawicki","followers_url":"https://api.github.com/users/kevinsawicki/followers","following_url":"https://api.github.com/users/kevinsawicki/following{/other_user}","gists_url":"https://api.github.com/users/kevinsawicki/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinsawicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinsawicki/subscriptions","organizations_url":"https://api.github.com/users/kevinsawicki/orgs","repos_url":"https://api.github.com/users/kevinsawicki/repos","events_url":"https://api.github.com/users/kevinsawicki/events{/privacy}","received_events_url":"https://api.github.com/users/kevinsawicki/received_events","type":"User","site_admin":true},"created_at":"2016-12-12T20:54:05Z","updated_at":"2016-12-12T20:54:05Z","body":"@pfrazee so is this resolved by #7947 ?"}}
{"actor":{"display_login":"kevinsawicki"}}