summaryrefslogtreecommitdiff
path: root/src/DownloadEngineFactory.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2014-02-19 21:34:20 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2014-02-19 21:37:11 +0900
commitde4cd8b59b52ba68a00e8d74dfbc1a53db21a3c2 (patch)
tree3314c3d4bc14a660e2ba7a9636c8f89227d7e1e8 /src/DownloadEngineFactory.cc
parent00e690a4d1a6cc0326f580d5c53ee757d72a8610 (diff)
Warn if neither --rpc-secret nor a combination of --rpc-user/rpc-passwd is set
Diffstat (limited to 'src/DownloadEngineFactory.cc')
-rw-r--r--src/DownloadEngineFactory.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/DownloadEngineFactory.cc b/src/DownloadEngineFactory.cc
index 1dd6aaa3..39b04f98 100644
--- a/src/DownloadEngineFactory.cc
+++ b/src/DownloadEngineFactory.cc
@@ -196,6 +196,12 @@ DownloadEngineFactory::newDownloadEngine
e.get(), pid));
}
if(op->getAsBool(PREF_ENABLE_RPC)) {
+ if(op->get(PREF_RPC_SECRET).empty() && op->get(PREF_RPC_USER).empty()) {
+ A2_LOG_WARN("Neither --rpc-secret nor a combination of --rpc-user and "
+ "--rpc-passwd is set. This is insecure. It is extremely "
+ "recommended to specify --rpc-secret with the adequate "
+ "secrecy or now deprecated --rpc-user and --rpc-passwd.");
+ }
bool ok = false;
bool secure = op->getAsBool(PREF_RPC_SECURE);
if(secure) {