Origin argument to native messaging host is inconsistent on different platforms |
||||
Issue description(This bug is about native messaging - https://developer.chrome.com/extensions/nativeMessaging) On Linux and Mac, the native messaging host receives a single argument when started: [command] [origin of extension] On Windows, the native messaging host receives two arguments: [command] --parent-window=[number] [origin of extension] For consistency (and ease of parsing), the origin should be the first argument on all platforms. The origin parameter is currently not documented, but it will be when the position of the origin argument is in a fixed location. This change has the risk of breaking native messaging hosts on Windows that relied on --parent-window being in the (undocumented) first position. I will send a PSA to notify extension developers of this upcoming change.
,
Oct 5 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f048ff5342719462f88ff146b8ac01346f320da8 commit f048ff5342719462f88ff146b8ac01346f320da8 Author: rob <rob@robwu.nl> Date: Wed Oct 05 15:52:04 2016 Ensure/document that the first parameter to the native messaging host is the origin This reflects the current implementation, and allows native messaging hosts to verify their caller when they have authorized multiple (extension) origins to invoke the native messaging host. On Windows, the first argument was --parent-window=integer, but to make the use of the origin parameter easier, the origin parameter is first, just like other platforms (Linux/OS X). BUG= 651496 R=sergeyu@chromium.org Review-Url: https://codereview.chromium.org/2271143002 Cr-Commit-Position: refs/heads/master@{#423169} [modify] https://crrev.com/f048ff5342719462f88ff146b8ac01346f320da8/chrome/browser/extensions/api/messaging/native_process_launcher.cc [modify] https://crrev.com/f048ff5342719462f88ff146b8ac01346f320da8/chrome/common/extensions/docs/templates/articles/nativeMessaging.html [modify] https://crrev.com/f048ff5342719462f88ff146b8ac01346f320da8/chrome/test/data/native_messaging/native_hosts/echo.py
,
Oct 5 2016
,
Oct 27 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f048ff5342719462f88ff146b8ac01346f320da8 commit f048ff5342719462f88ff146b8ac01346f320da8 Author: rob <rob@robwu.nl> Date: Wed Oct 05 15:52:04 2016 Ensure/document that the first parameter to the native messaging host is the origin This reflects the current implementation, and allows native messaging hosts to verify their caller when they have authorized multiple (extension) origins to invoke the native messaging host. On Windows, the first argument was --parent-window=integer, but to make the use of the origin parameter easier, the origin parameter is first, just like other platforms (Linux/OS X). BUG= 651496 R=sergeyu@chromium.org Review-Url: https://codereview.chromium.org/2271143002 Cr-Commit-Position: refs/heads/master@{#423169} [modify] https://crrev.com/f048ff5342719462f88ff146b8ac01346f320da8/chrome/browser/extensions/api/messaging/native_process_launcher.cc [modify] https://crrev.com/f048ff5342719462f88ff146b8ac01346f320da8/chrome/common/extensions/docs/templates/articles/nativeMessaging.html [modify] https://crrev.com/f048ff5342719462f88ff146b8ac01346f320da8/chrome/test/data/native_messaging/native_hosts/echo.py
,
Nov 4 2016
[Automated comment] removing mislabelled merge-merged-2840 |
||||
►
Sign in to add a comment |
||||
Comment 1 by rob@robwu.nl
, Sep 29 2016