Disallow sending of username / pass to unspecifed pool

This commit is contained in:
Unknown
2017-12-08 11:35:18 +00:00
committed by fireice-uk
parent c4ae72ecfb
commit 065f420f89
+14
View File
@@ -479,6 +479,13 @@ int main(int argc, char *argv[])
}
else if(opName.compare("-u") == 0 || opName.compare("--user") == 0)
{
if(params::inst().poolURL.empty())
{
printer::inst()->print_msg(L0, "Pool address has to be set if you want to specify username and password.");
win_exit();
return 1;
}
++i;
if( i >=argc )
{
@@ -490,6 +497,13 @@ int main(int argc, char *argv[])
}
else if(opName.compare("-p") == 0 || opName.compare("--pass") == 0)
{
if(params::inst().poolURL.empty())
{
printer::inst()->print_msg(L0, "Pool address has to be set if you want to specify username and password.");
win_exit();
return 1;
}
++i;
if( i >=argc )
{