summaryrefslogtreecommitdiff
path: root/ZeroTierUI/networkwidget.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-02-05 12:38:37 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-02-05 12:38:37 -0800
commit3f6152806f9f1edc461dd3d6a828a4f69fffc3f7 (patch)
tree5e519e3eaddd0a39e410d17800b7aa16cdf510b6 /ZeroTierUI/networkwidget.cpp
parent7fdca150a9f2a689ed58dc7fb3c548551e27456f (diff)
downloadinfinitytier-3f6152806f9f1edc461dd3d6a828a4f69fffc3f7.tar.gz
infinitytier-3f6152806f9f1edc461dd3d6a828a4f69fffc3f7.zip
Add security notice the first time a user joins a public network.
Diffstat (limited to 'ZeroTierUI/networkwidget.cpp')
-rw-r--r--ZeroTierUI/networkwidget.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/ZeroTierUI/networkwidget.cpp b/ZeroTierUI/networkwidget.cpp
index a99fef1e..0fdaa514 100644
--- a/ZeroTierUI/networkwidget.cpp
+++ b/ZeroTierUI/networkwidget.cpp
@@ -28,6 +28,8 @@
#include "networkwidget.h"
#include "mainwindow.h"
#include "ui_networkwidget.h"
+#include "onetimedialog.h"
+#include "main.h"
#include <QClipboard>
#include <QString>
@@ -43,7 +45,8 @@
NetworkWidget::NetworkWidget(QWidget *parent,const std::string &nwid) :
QWidget(parent),
ui(new Ui::NetworkWidget),
- networkIdStr(nwid)
+ networkIdStr(nwid),
+ publicWarningShown(false)
{
ui->setupUi(this);
ui->networkIdButton->setText(QString(nwid.c_str()));
@@ -98,9 +101,15 @@ void NetworkWidget::setNetworkType(const std::string &type)
ui->networkTypeLabel->setText(QString(type.c_str()));
if (type == "?")
ui->networkTypeLabel->setStatusTip("Waiting for configuration...");
- else if (type == "public")
+ else if (type == "public") {
+ if ((!publicWarningShown)&&(!settings->value("shown_publicWarning",false).toBool())) {
+ publicWarningShown = true;
+ OneTimeDialog *d = new OneTimeDialog(mainWindow,"shown_publicWarning","Security Notice","Security Notice:"ZT_EOL_S""ZT_EOL_S"You have joined a public network. Anyone can join these. We recommend making sure that your system's automatic software updates are enabled and turning off any shared network services that you do not want people to access.");
+ d->setModal(false);
+ d->show();
+ }
ui->networkTypeLabel->setStatusTip("This network can be joined by anyone in the world.");
- else if (type == "private")
+ } else if (type == "private")
ui->networkTypeLabel->setStatusTip("This network is private; only authorized peers can join.");
else ui->networkTypeLabel->setStatusTip("Unknown network type.");
}