mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
prefs: cloud_new_password is not a preference
It's a mamber of the cloud storage authentication class, used to hold the proposed new password until the backend has accepted it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ae653703a5
commit
2b3f6c607b
9 changed files with 4 additions and 45 deletions
|
@ -26,6 +26,7 @@ QNetworkReply* CloudStorageAuthenticate::backend(const QString& email,const QStr
|
|||
} else if (!newpasswd.isEmpty()) {
|
||||
requestUrl = QUrl(CLOUDBACKENDUPDATE);
|
||||
payload += QChar(' ') + newpasswd;
|
||||
cloudNewPassword = newpasswd;
|
||||
} else {
|
||||
requestUrl = QUrl(CLOUDBACKENDVERIFY);
|
||||
payload += QChar(' ') + pin;
|
||||
|
@ -64,8 +65,8 @@ void CloudStorageAuthenticate::uploadFinished()
|
|||
report_error(qPrintable(tr("Cloud account verification required, enter PIN in preferences")));
|
||||
} else if (cloudAuthReply == QLatin1String("[PASSWDCHANGED]")) {
|
||||
free((void *)prefs.cloud_storage_password);
|
||||
prefs.cloud_storage_password = prefs.cloud_storage_newpassword;
|
||||
prefs.cloud_storage_newpassword = NULL;
|
||||
prefs.cloud_storage_password = strdup(qPrintable(cloudNewPassword));
|
||||
cloudNewPassword.clear();
|
||||
emit passwordChangeSuccessful();
|
||||
return;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue