mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -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;
|
||||
}
|
||||
|
||||
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…
Add table
Add a link
Reference in a new issue