From 899f61d05d3fa6e7acd6f4ed55a04176d71a7c57 Mon Sep 17 00:00:00 2001 From: Sup Yut Sum Date: Tue, 9 Apr 2013 23:25:39 +0800 Subject: [PATCH] Warn about data security when running daemon Signed-off-by: Sup Yut Sum --- Languages/Tortoise.pot | 4 ++++ src/Resources/TortoiseProcENG.rc | 2 ++ src/TortoiseProc/Commands/DaemonCommand.cpp | 4 ++++ src/TortoiseProc/resource.h | 1 + 4 files changed, 11 insertions(+) diff --git a/Languages/Tortoise.pot b/Languages/Tortoise.pot index 421ace367..418cfb829 100644 --- a/Languages/Tortoise.pot +++ b/Languages/Tortoise.pot @@ -9018,6 +9018,10 @@ msgstr "" msgid "When the patch does not apply cleanly, fall back on 3-way merge if the patch records the identity of blobs it is supposed to apply to and we have those blobs available locally." msgstr "" +#. Resource IDs: (1409) +msgid "While running daemon, all data of this repository is exposed without authentication and/or encryption." +msgstr "" + #. Resource IDs: (65535) msgid "Whitespaces" msgstr "" diff --git a/src/Resources/TortoiseProcENG.rc b/src/Resources/TortoiseProcENG.rc index a83b56203..3c9c9a8d9 100644 --- a/src/Resources/TortoiseProcENG.rc +++ b/src/Resources/TortoiseProcENG.rc @@ -3082,6 +3082,8 @@ END STRINGTABLE BEGIN IDS_SYSTEM_WINCRED "wincred - all Windows users" + IDS_DAEMON_SECURITY_WARN + "While running daemon, all data of this repository is exposed without authentication and/or encryption." IDS_SETTINGS_LOCAL "Local" IDS_SETTINGS_GLOBAL "Global" IDS_SETTINGS_SYSTEM "System" diff --git a/src/TortoiseProc/Commands/DaemonCommand.cpp b/src/TortoiseProc/Commands/DaemonCommand.cpp index c3a7023ec..f210556d8 100644 --- a/src/TortoiseProc/Commands/DaemonCommand.cpp +++ b/src/TortoiseProc/Commands/DaemonCommand.cpp @@ -20,10 +20,14 @@ #include "DaemonCommand.h" #include "ProgressDlg.h" #include "UnicodeUtils.h" +#include "MessageBox.h" bool DaemonCommand::Execute() { + if (CMessageBox::ShowCheck(NULL, IDS_DAEMON_SECURITY_WARN, IDS_APPNAME, MB_ICONINFORMATION | MB_YESNO, _T("DaemonNoSecurityWarning"), IDS_MSGBOX_DONOTSHOWAGAIN) != IDYES) + return false; + WSADATA wsaData; if (WSAStartup(MAKEWORD(2, 2), &wsaData) != NO_ERROR) { diff --git a/src/TortoiseProc/resource.h b/src/TortoiseProc/resource.h index 0afc08cfb..795cdb5ee 100644 --- a/src/TortoiseProc/resource.h +++ b/src/TortoiseProc/resource.h @@ -890,6 +890,7 @@ #define IDS_WARN_NOVALIDPATH 1407 #define IDS_SYSTEM_WINCRED 1408 #define IDC_PROXYLABEL1 1409 +#define IDS_DAEMON_SECURITY_WARN 1409 #define IDC_PROXYLABEL2 1410 #define IDC_PROXYLABEL3 1411 #define IDC_PROXYLABEL4 1412 -- 2.11.4.GIT