New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 703777 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature

Blocking:
issue 609303
issue 706536



Sign in to add a comment

nassh: register as protocol handler for "ssh://"

Project Member Reported by varz@google.com, Mar 21 2017

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.
 

Comment 1 by vapier@chromium.org, Mar 29 2017

Cc: vapier@chromium.org
Owner: vapier@chromium.org
Status: Started (was: Untriaged)
implemented here: https://chromium-review.googlesource.com/461461


Comment 2 by vapier@chromium.org, Mar 29 2017

Blocking: 706536

Comment 3 by vapier@chromium.org, Mar 29 2017

Blocking: 609303

Comment 4 by vapier@chromium.org, Mar 29 2017

Summary: nassh: register as protocol handler for "ssh://" (was: Register Secure Shell as protocol handler for "ssh")
Project Member

Comment 5 by bugdroid1@chromium.org, 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

Comment 6 by vapier@chromium.org, Mar 30 2017

Status: Fixed (was: Started)
it should be in the next release (0.8.35.7+)

Sign in to add a comment