New issue
Advanced search Search tips

Issue 645818 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 355483
Owner:
Closed: May 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Feature



Sign in to add a comment

Look for native messaging host apps in [userdir]\NativeMessagingHosts\ on Windows

Reported by ch...@chrisn.me.uk, Sep 11 2016

Issue description

Chrome Version: 53.0.2785.101 (Official Build) m (32-bit)
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)

Following the resolution of  bug 237873 , Chromium allows individual users to install native messaging host applications for themselves without having to elevate their privileges. On POSIX systems, Chromium looks for user-installed NMH manifest files in the "NativeMessagingHosts" subdirectory of the user data directory Chromium is currently using; on Windows, it looks for subkeys of HKCU\SOFTWARE\Google\Chrome\NativeMessagingHosts\ in the registry that point to manifest files.

A downside of looking in the registry for paths to NMH manifests is that all Chromium processes running on a Windows system under a particular user account will find the same set of NMH manifests; unlike on a Linux/OS X system, it's not possible to contain a NMH manifest to a single Chromium process (e.g. by starting it with "chrome --user-data-dir=[temp_path]" and placing the NMH manifest at [temp_path]\NativeMessagingHosts\[whatever].json).

Would it be possible to make Chromium also look for NMH manifests in [userdir]\NativeMessagingHosts\ on Windows, like it does on other OSes? This shouldn't be a security risk: regular users can already write their own keys under HKCU in the registry without privilege elevation, so this is no more risky than the way Chromium already implements this feature on Windows.
 
Components: Platform>Apps>API
Labels: -Type-Bug TE-NeedsTriageHelp Type-Feature
This look like a feature request.
Added TE-NeedsTriageHelp, as it can't be triaged from TE end.

Comment 2 by ch...@chrisn.me.uk, Nov 25 2016

I've written a patch for this, but the NMH unit tests will need to be updated for Windows to account for the fact that NMH applications will be searched for in [userdir]\NativeMessagingHosts\ and [exedir]\NativeMessagingHosts\. I don't know enough about Chromium to update them, so I'll need help with that. Should I submit the patch to CR anyway and ask for help there, or should I do something else?

Comment 3 by ch...@chrisn.me.uk, Nov 26 2016

Not to worry, I got the unit tests figured out. Looks like Sergey is the owner of the native messaging stuff - I'll talk to him about this out-of-band.
Owner: sergeyu@chromium.org
Status: Started (was: Unconfirmed)
Labels: -TE-NeedsTriageHelp
Mergedinto: 355483
Status: Duplicate (was: Started)

Sign in to add a comment