mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-11 22:25:53 +08:00
Enable encryption by default
This commit is contained in:
2
doc/newsfragments/enable-crypto-by-default.feature
Normal file
2
doc/newsfragments/enable-crypto-by-default.feature
Normal 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.
|
||||
@@ -516,8 +516,8 @@ void MainWindow::startBarrier()
|
||||
|
||||
#endif
|
||||
|
||||
if (m_AppConfig->getCryptoEnabled()) {
|
||||
args << "--enable-crypto";
|
||||
if (!m_AppConfig->getCryptoEnabled()) {
|
||||
args << "--disable-crypto";
|
||||
}
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
|
||||
@@ -166,7 +166,8 @@ private:
|
||||
" -l --log <file> write log messages to file.\n" \
|
||||
" --no-tray disable the system tray icon.\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" \
|
||||
" --drop-dir <path> use named drop target directory instead.\n"
|
||||
|
||||
|
||||
@@ -282,7 +282,10 @@ ArgParser::parseGenericArgs(int argc, const char* const* argv, int& i)
|
||||
argsBase().m_dropTarget = argv[++i];
|
||||
}
|
||||
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)) {
|
||||
argsBase().m_profileDirectory = argv[++i];
|
||||
|
||||
@@ -42,7 +42,7 @@ m_enableDragDrop(false),
|
||||
m_dropTarget(""),
|
||||
m_shouldExit(false),
|
||||
m_barrierAddress(),
|
||||
m_enableCrypto(false),
|
||||
m_enableCrypto(true),
|
||||
m_profileDirectory(""),
|
||||
m_pluginDirectory("")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user