Added password language check

pull/140/head
parent 56ea95dff8
commit d4167897da
No known key found for this signature in database
GPG Key ID: FF1D842BF4DDE92B

@ -582,3 +582,7 @@ msgstr ""
#: source/ubl-strings.h:183
msgid "Repository were not added"
msgstr ""
#: source/ubl-strings.h:183
msgid "Invalid password"
msgstr ""

@ -596,3 +596,7 @@ msgstr "Выбранный каталог хранилища находится
#: source/ubl-strings.h:183
msgid "Repository were not added"
msgstr "Репозиторий не добавлен"
#: source/ubl-strings.h:183
msgid "Invalid password"
msgstr "Неверный пароль"

@ -47,9 +47,17 @@ void on_key_generate_accept(GtkWidget *self, key_creation_window* window){
const char *password_confirm = gtk_entry_get_text(GTK_ENTRY(window->PasswordConfirmationEntry));
int ex_status=0;
if (yon_char_is_empty(password)&&yon_char_is_empty(password_confirm)){
yon_debug_output("%s\n",yon_generate_key_no_password_command(type,name,email,strength,comment,expire,password));
ex_status = system(yon_debug_output("%s\n",yon_generate_key_no_password_command(type,name,email,strength,comment,expire,password)));
} else if (!strcmp(password,password_confirm)){
for (int i=0;i<strlen(password);i++){
if (!g_ascii_isgraph(password[i])){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),PASSWORD_INVALID_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->PasswordEntry);
return;
}
}
yon_debug_output("%s\n",yon_generate_key_command(type,name,email,strength,comment,expire,password));
ex_status = system(yon_debug_output("%s\n",yon_generate_key_command(type,name,email,strength,comment,expire,password)));
} else {

@ -182,4 +182,6 @@
#define INSIDE_STORAGE_ERROR_LABEL _("Chosen storage directory is inside of another storage")
#define UNADDED_REPO_LABEL _("Repository were not added")
#define UNADDED_REPO_LABEL _("Repository were not added")
#define PASSWORD_INVALID_LABEL _("Invalid password")
Loading…
Cancel
Save