Cloud storage: implement confirmation of email address via PIN

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-06-09 11:21:46 -07:00
parent a04f1fd133
commit 57507cfb93
3 changed files with 23 additions and 9 deletions

View file

@ -1024,8 +1024,7 @@ fraction_t string_to_fraction(const char *str)
int getCloudURL(QString &filename)
{
QString email = QString(prefs.cloud_storage_email);
email.replace("@", "_at_");
email.replace(QRegularExpression("[^a-zA-Z0-9._+-]"), "");
email.replace(QRegularExpression("[^a-zA-Z0-9@._+-]"), "");
if (email.isEmpty() || same_string(prefs.cloud_storage_password, ""))
return report_error("Please configure Cloud storage email and password in the preferences");
if (email != prefs.cloud_storage_email_encoded) {