mirror of https://github.com/keeweb/keeweb.git
added more browser extensions to the native host
This commit is contained in:
parent
fa60d02129
commit
101aee81c0
|
@ -10,7 +10,7 @@ format:
|
|||
clang-format -i src/*.cpp
|
||||
|
||||
run:
|
||||
echo -n 020000007b7d | xxd -r -p | build/keeweb-native-messaging-host chrome-extension://enjifmdnhaddmajefhfaoglcfdobkcpj
|
||||
echo -n 020000007b7d | xxd -r -p | build/keeweb-native-messaging-host chrome-extension://enjifmdnhaddmajefhfaoglcfdobkcpj/
|
||||
|
||||
tests:
|
||||
../../node_modules/.bin/mocha test/native-messaging-host-test.mjs
|
||||
|
|
|
@ -24,7 +24,13 @@ constexpr auto kKeeWebLaunchArg = "--browser-extension";
|
|||
constexpr auto kSockName = "keeweb-browser.sock";
|
||||
|
||||
constexpr std::array kAllowedOrigins = {
|
||||
std::string_view("chrome-extension://enjifmdnhaddmajefhfaoglcfdobkcpj/")};
|
||||
// KeeWeb Connect: Chrome
|
||||
std::string_view("chrome-extension://enjifmdnhaddmajefhfaoglcfdobkcpj/"),
|
||||
// KeePassXC-Browser: Chrome
|
||||
std::string_view("chrome-extension://oboonakemofpalcgghocfoadofidjkkk/"),
|
||||
// KeePassXC-Browser: Edge
|
||||
std::string_view("chrome-extension://pdffhmdngciaglkoonimfcmckehcpafo/"),
|
||||
};
|
||||
|
||||
constexpr uint32_t kMaxKeeWebConnectAttempts = 10;
|
||||
constexpr uint32_t kMaxKeeWebConnectRetryTimeoutMillis = 500;
|
||||
|
@ -57,8 +63,8 @@ bool check_args(int argc, char *argv[]) {
|
|||
std::string origin = argv[1];
|
||||
auto found = std::find(kAllowedOrigins.begin(), kAllowedOrigins.end(), origin);
|
||||
if (found == kAllowedOrigins.end()) {
|
||||
std::cerr << "Bad origin: " << origin << std::endl;
|
||||
return false;
|
||||
std::cerr << "Bad origin: " << origin << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue