diff --git a/retroshare-gui/src/gui/GenCertDialog.cpp b/retroshare-gui/src/gui/GenCertDialog.cpp index 8c82b2164..408b93831 100644 --- a/retroshare-gui/src/gui/GenCertDialog.cpp +++ b/retroshare-gui/src/gui/GenCertDialog.cpp @@ -162,6 +162,14 @@ void GenCertDialog::genPerson() QVariant data = ui.genPGPuser->itemData(pgpidx); PGPId = (data.toString()).toStdString(); } else { + if (ui.password_input->text().length() < 3 || ui.name_input->text().length() < 3) { + /* Message Dialog */ + QMessageBox::StandardButton sb = QMessageBox::warning ( NULL, + tr("Generate GPG key Failure"), + tr("Your Name or password is too short (3+ characters)"), + QMessageBox::Ok); + return; + } //generate a new gpg key std::string err_string; ui.no_gpg_key_label->setText(tr("Generating new GPG key, please be patient. Fill in your GPG password when asked.")); diff --git a/retroshare-gui/src/gui/GenCertDialog.ui b/retroshare-gui/src/gui/GenCertDialog.ui index d21487351..87b1a760d 100644 --- a/retroshare-gui/src/gui/GenCertDialog.ui +++ b/retroshare-gui/src/gui/GenCertDialog.ui @@ -1092,7 +1092,14 @@ p, li { white-space: pre-wrap; } - + + + + + + QLineEdit::Password + +