mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 21:58:57 -04:00
Fix location creation via JSON API
To complete location creation login is needed
This commit is contained in:
parent
afb92999d8
commit
b98246ee21
1 changed files with 7 additions and 2 deletions
|
@ -1988,13 +1988,18 @@ bool RsLoginHelper::createLocation(
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string sslPassword =
|
||||||
|
RSRandom::random_alphaNumericString(RsInit::getSslPwdLen());
|
||||||
|
|
||||||
if(!rsNotify->cachePgpPassphrase(password)) return false;
|
if(!rsNotify->cachePgpPassphrase(password)) return false;
|
||||||
if(!rsNotify->setDisableAskPassword(true)) return false;
|
if(!rsNotify->setDisableAskPassword(true)) return false;
|
||||||
|
|
||||||
bool ret = RsAccounts::createNewAccount(
|
bool ret = RsAccounts::createNewAccount(
|
||||||
l.mPgpId, "", l.mLocationName, "", makeHidden, makeAutoTor,
|
l.mPgpId, "", l.mLocationName, "", makeHidden, makeAutoTor,
|
||||||
RSRandom::random_alphaNumericString(RsInit::getSslPwdLen()),
|
sslPassword, l.mLocationId, errorMessage );
|
||||||
l.mLocationId, errorMessage );
|
|
||||||
|
ret = ret && RsInit::LoadPassword(sslPassword);
|
||||||
|
ret = ret && RsInit::OK == attemptLogin(l.mLocationId, password);
|
||||||
|
|
||||||
rsNotify->setDisableAskPassword(false);
|
rsNotify->setDisableAskPassword(false);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue