Merge pull request #1342 from p12tic/enable-encryption-by-default

Enable encryption by default
This commit is contained in:
Povilas Kanapickas 2021-11-01 03:12:32 +02:00 committed by GitHub
commit bf667a429c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 5 deletions

View File

@ -0,0 +1,2 @@
The `--enable-crypto` command line option has been made the default to reduce chances of accidental security mishaps when configuring Barrier from command line.
A new `--disable-crypto` command line option has been added to explicitly disable encryption.

View File

@ -516,8 +516,8 @@ void MainWindow::startBarrier()
#endif #endif
if (m_AppConfig->getCryptoEnabled()) { if (!m_AppConfig->getCryptoEnabled()) {
args << "--enable-crypto"; args << "--disable-crypto";
} }
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)

View File

@ -166,7 +166,8 @@ private:
" -l --log <file> write log messages to file.\n" \ " -l --log <file> write log messages to file.\n" \
" --no-tray disable the system tray icon.\n" \ " --no-tray disable the system tray icon.\n" \
" --enable-drag-drop enable file drag & drop.\n" \ " --enable-drag-drop enable file drag & drop.\n" \
" --enable-crypto enable the crypto (ssl) plugin.\n" \ " --enable-crypto enable the crypto (ssl) plugin (default, deprecated).\n" \
" --disable-crypto disable the crypto (ssl) plugin.\n" \
" --profile-dir <path> use named profile directory instead.\n" \ " --profile-dir <path> use named profile directory instead.\n" \
" --drop-dir <path> use named drop target directory instead.\n" " --drop-dir <path> use named drop target directory instead.\n"

View File

@ -282,7 +282,10 @@ ArgParser::parseGenericArgs(int argc, const char* const* argv, int& i)
argsBase().m_dropTarget = argv[++i]; argsBase().m_dropTarget = argv[++i];
} }
else if (isArg(i, argc, argv, NULL, "--enable-crypto")) { else if (isArg(i, argc, argv, NULL, "--enable-crypto")) {
argsBase().m_enableCrypto = true; LOG((CLOG_INFO "--enable-crypto is used by default. The option is deprecated."));
}
else if (isArg(i, argc, argv, NULL, "--disable-crypto")) {
argsBase().m_enableCrypto = false;
} }
else if (isArg(i, argc, argv, NULL, "--profile-dir", 1)) { else if (isArg(i, argc, argv, NULL, "--profile-dir", 1)) {
argsBase().m_profileDirectory = argv[++i]; argsBase().m_profileDirectory = argv[++i];

View File

@ -42,7 +42,7 @@ m_enableDragDrop(false),
m_dropTarget(""), m_dropTarget(""),
m_shouldExit(false), m_shouldExit(false),
m_barrierAddress(), m_barrierAddress(),
m_enableCrypto(false), m_enableCrypto(true),
m_profileDirectory(""), m_profileDirectory(""),
m_pluginDirectory("") m_pluginDirectory("")
{ {