mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fix location creation via JSON API
To complete location creation login is needed
This commit is contained in:
parent
afb92999d8
commit
b98246ee21
@ -1988,13 +1988,18 @@ bool RsLoginHelper::createLocation(
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string sslPassword =
|
||||
RSRandom::random_alphaNumericString(RsInit::getSslPwdLen());
|
||||
|
||||
if(!rsNotify->cachePgpPassphrase(password)) return false;
|
||||
if(!rsNotify->setDisableAskPassword(true)) return false;
|
||||
|
||||
bool ret = RsAccounts::createNewAccount(
|
||||
l.mPgpId, "", l.mLocationName, "", makeHidden, makeAutoTor,
|
||||
RSRandom::random_alphaNumericString(RsInit::getSslPwdLen()),
|
||||
l.mLocationId, errorMessage );
|
||||
sslPassword, l.mLocationId, errorMessage );
|
||||
|
||||
ret = ret && RsInit::LoadPassword(sslPassword);
|
||||
ret = ret && RsInit::OK == attemptLogin(l.mLocationId, password);
|
||||
|
||||
rsNotify->setDisableAskPassword(false);
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user