nassh: register as protocol handler for "ssh://" |
|||||
Issue description
It's possible to register as a handler for the "ssh" protocol:
navigator.registerProtocolHandler("ssh",
"chrome-extension://pnhechapfaindjhompbnflcldabbghjo/html/nassh.html?uri=%s",
"Secure Shell");
The user will be prompted to accept this setting, and Chrome will send clicks on SSH links to the specified URL, so:
ssh://username@hostname
Becomes:
chrome-extension://pnhechapfaindjhompbnflcldabbghjo/html/nassh.html?uri=ssh%3A%2F%2Fusername%40hostname
Unfortunately, this navigation event bypasses the "Open as window" setting.
,
Mar 29 2017
,
Mar 29 2017
,
Mar 29 2017
,
Mar 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/apps/libapps/+/b2ad22c7a9609ec8fe6505484dab132738375978 commit b2ad22c7a9609ec8fe6505484dab132738375978 Author: Mike Frysinger <vapier@chromium.org> Date: Thu Mar 30 17:44:37 2017 nassh: register ourselves as ssh:// handler Trying to register a protocol handler can only be done in response to a user initiated event, so we can't register it automatically. Instead, we'll hook the connect button so we register as soon as someone connects to a system. The user will get a prompt at that time and can decline or approve the registration. It shouldn't show up again. With multiple extensions, users can select their preference under the standard handlers page: chrome://settings/handlers Basically we add support for another command line form. In-addition to "nassh.html#profile-id:XXX", we support "nassh.html#uri:XXX". Another form is needed because the URI is encoded. e.g. The full form is: nassh.html#uri:ssh%3A//vapier@vapier%3A22 We don't want to blindly unescape the command line as we might mangle valid values otherwise. We don't support profile names here since it doesn't make much sense: profile names are inherently system-specific and <a> links in HTML pages are inherently system-independent. BUG= chromium:703777 Change-Id: Ic7d6c6d7d9d46ec353179416a37de8f73b5584fa Reviewed-on: https://chromium-review.googlesource.com/461461 Reviewed-by: Brandon Gilmore <varz@google.com> Reviewed-by: Rob Ginda <rginda@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/b2ad22c7a9609ec8fe6505484dab132738375978/nassh/js/nassh_connect_dialog.js [modify] https://crrev.com/b2ad22c7a9609ec8fe6505484dab132738375978/nassh/doc/FAQ.md [modify] https://crrev.com/b2ad22c7a9609ec8fe6505484dab132738375978/nassh/js/nassh_command_instance.js [modify] https://crrev.com/b2ad22c7a9609ec8fe6505484dab132738375978/nassh/js/nassh.js
,
Mar 30 2017
it should be in the next release (0.8.35.7+) |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by vapier@chromium.org
, Mar 29 2017Owner: vapier@chromium.org
Status: Started (was: Untriaged)