mirror of https://github.com/aria2/aria2
Warn if neither --rpc-secret nor a combination of --rpc-user/rpc-passwd is set
parent
00e690a4d1
commit
de4cd8b59b
|
@ -196,6 +196,12 @@ DownloadEngineFactory::newDownloadEngine
|
||||||
e.get(), pid));
|
e.get(), pid));
|
||||||
}
|
}
|
||||||
if(op->getAsBool(PREF_ENABLE_RPC)) {
|
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 ok = false;
|
||||||
bool secure = op->getAsBool(PREF_RPC_SECURE);
|
bool secure = op->getAsBool(PREF_RPC_SECURE);
|
||||||
if(secure) {
|
if(secure) {
|
||||||
|
|
Loading…
Reference in New Issue