mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-12 07:59:29 -05:00
moved passwd request for webui to a more appropriate place
This commit is contained in:
parent
ab5da5ebf5
commit
b8398aae07
@ -125,34 +125,13 @@ int main(int argc, char* argv[])
|
|||||||
#endif // ifdef SIGBREAK
|
#endif // ifdef SIGBREAK
|
||||||
|
|
||||||
#endif // def __ANDROID__
|
#endif // def __ANDROID__
|
||||||
|
std::cerr << "========================================================================" << std::endl;
|
||||||
|
std::cerr << "== Retroshare Service ==" << std::endl;
|
||||||
|
std::cerr << "========================================================================" << std::endl;
|
||||||
|
|
||||||
RsInit::InitRsConfig();
|
RsInit::InitRsConfig();
|
||||||
RsControl::earlyInitNotificationSystem();
|
RsControl::earlyInitNotificationSystem();
|
||||||
|
|
||||||
#ifndef __ANDROID__
|
|
||||||
std::string webui_pass1 = "Y";
|
|
||||||
std::string webui_pass2 = "N";
|
|
||||||
|
|
||||||
for(;;)
|
|
||||||
{
|
|
||||||
webui_pass1 = readStringFromKeyboard("Please register a password for the web interface: ");
|
|
||||||
webui_pass2 = readStringFromKeyboard("Please enter the same password again : ");
|
|
||||||
|
|
||||||
if(webui_pass1 != webui_pass2)
|
|
||||||
{
|
|
||||||
std::cerr << "Passwords do not match!" << std::endl;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if(webui_pass1.empty())
|
|
||||||
{
|
|
||||||
std::cerr << "Password cannot be empty!" << std::endl;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
// TODO: is this still needed with argstream?
|
// TODO: is this still needed with argstream?
|
||||||
/* HACK to avoid stupid OSX Finder behaviour
|
/* HACK to avoid stupid OSX Finder behaviour
|
||||||
@ -175,7 +154,7 @@ int main(int argc, char* argv[])
|
|||||||
>> parameter('i',"ip-address" ,conf.forcedInetAddress,"nnn.nnn.nnn.nnn", "Force IP address to use (if cannot be detected)." ,false)
|
>> parameter('i',"ip-address" ,conf.forcedInetAddress,"nnn.nnn.nnn.nnn", "Force IP address to use (if cannot be detected)." ,false)
|
||||||
>> parameter('o',"opmode" ,conf.opModeStr ,"opmode" ,"Set Operating mode (Full, NoTurtle, Gaming, Minimal)." ,false)
|
>> parameter('o',"opmode" ,conf.opModeStr ,"opmode" ,"Set Operating mode (Full, NoTurtle, Gaming, Minimal)." ,false)
|
||||||
>> parameter('p',"port" ,conf.forcedPort ,"port", "Set listenning port to use." ,false)
|
>> parameter('p',"port" ,conf.forcedPort ,"port", "Set listenning port to use." ,false)
|
||||||
>> parameter('U',"user-id" ,prefUserString ,"ID", "[ocation Id] Selected account to use and asks for passphrase. Use \"-u list\" in order to list available accounts.",false);
|
>> parameter('U',"user-id" ,prefUserString ,"ID", "[node Id] Selected account to use and asks for passphrase. Use \"-u list\" in order to list available accounts.",false);
|
||||||
|
|
||||||
#ifdef RS_JSONAPI
|
#ifdef RS_JSONAPI
|
||||||
as >> parameter('J', "jsonApiPort", conf.jsonApiPort, "jsonApiPort", "Enable JSON API on the specified port", false )
|
as >> parameter('J', "jsonApiPort", conf.jsonApiPort, "jsonApiPort", "Enable JSON API on the specified port", false )
|
||||||
@ -196,6 +175,28 @@ int main(int argc, char* argv[])
|
|||||||
#ifndef __ANDROID__
|
#ifndef __ANDROID__
|
||||||
RsServiceNotify *notify = new RsServiceNotify();
|
RsServiceNotify *notify = new RsServiceNotify();
|
||||||
rsNotify->registerNotifyClient(notify);
|
rsNotify->registerNotifyClient(notify);
|
||||||
|
|
||||||
|
std::string webui_pass1 = "Y";
|
||||||
|
std::string webui_pass2 = "N";
|
||||||
|
|
||||||
|
for(;;)
|
||||||
|
{
|
||||||
|
webui_pass1 = readStringFromKeyboard("Please register a password for the web interface: ");
|
||||||
|
webui_pass2 = readStringFromKeyboard("Please enter the same password again : ");
|
||||||
|
|
||||||
|
if(webui_pass1 != webui_pass2)
|
||||||
|
{
|
||||||
|
std::cerr << "Passwords do not match!" << std::endl;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if(webui_pass1.empty())
|
||||||
|
{
|
||||||
|
std::cerr << "Password cannot be empty!" << std::endl;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
conf.main_executable_path = argv[0];
|
conf.main_executable_path = argv[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user