diff --git a/source/ubl-settings-update.c b/source/ubl-settings-update.c
index 2d617ac..34aad3d 100644
--- a/source/ubl-settings-update.c
+++ b/source/ubl-settings-update.c
@@ -786,7 +786,7 @@ void on_web_publish_remove_accept(GtkWidget *, main_window *widgets){
}
char *full_name = NULL;
gtk_tree_model_get(model,&iter,8,&full_name,-1);
- yon_config_remove_by_key(REPOPUBLIC_WEB_full(full_name));
+ yon_config_remove_by_key(full_name);
yon_interface_update(widgets);
}
@@ -1207,6 +1207,11 @@ void on_web_publish_accept(GtkWidget *, dictionary *dict){
yon_ubl_status_highlight_incorrect(window->UserPasswordEntry);
return;
}
+ if (encryption&&!yon_char_is_empty(encryption)&&(strlen(user_password)!=128&&strlen(user_password)!=64)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),PASSWORD_RESTRICTED_SYMBOL_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(window->UserPasswordEntry);
+ return;
+ }
if (username_check&&yon_char_is_empty(username)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->UsernameEntry);
@@ -1395,7 +1400,7 @@ void on_password_accept(GtkWidget *,dictionary *dict){
yon_ubl_status_highlight_incorrect(window->PasswordHashEntry);
return;
}
- if (check_is_password_hash(hash)){
+ if (strlen((hash))!=128||strlen(hash)!=64){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),INCORRECT_HASH_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->PasswordHashEntry);
return;
@@ -1428,54 +1433,6 @@ void on_password_accept(GtkWidget *,dictionary *dict){
}
}
gtk_widget_destroy(window->Window);
-
- // if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->NoEncriptionCheck))){
- // char *encryption = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->EncryptionCombo));
- // char *hash = (char*)gtk_entry_get_text(GTK_ENTRY(window->PasswordHashEntry));
- // if (yon_char_is_empty(hash)){
- // yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- // yon_ubl_status_highlight_incorrect(window->PasswordHashEntry);
- // return;
- // }
- // char *temp = yon_char_unite(encryption,"|",hash,NULL);
- // gtk_entry_set_text(GTK_ENTRY(target),temp);
- // free(temp);
- // } else {
- // char *password = (char*)gtk_entry_get_text(GTK_ENTRY(window->PasswordEntry));
- // char *password_check = (char*)gtk_entry_get_text(GTK_ENTRY(window->RepeatPasswordEntry));
- // if (strpbrk(password,"!@#%^&*\'")){
- // yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),PASSWORD_RESTRICTED_SYMBOL_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- // yon_ubl_status_highlight_incorrect(window->PasswordEntry);
- // return;
- // }
- // if (strcmp(password,password_check)){
- // yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),PASSWORD_MISMATCH_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
- // yon_ubl_status_highlight_incorrect(window->PasswordEntry);
- // yon_ubl_status_highlight_incorrect(window->RepeatPasswordEntry);
- // return;
- // }
- // char *encryption = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->EncryptionCombo));
- // if (yon_char_is_empty(encryption)){
- // gtk_entry_set_text(GTK_ENTRY(target),password);
-
- // } else {
- // if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->NoEncriptionCheck))){
- // char *temp = yon_char_unite(encryption,"|",password,NULL);
- // gtk_entry_set_text(GTK_ENTRY(target),temp);
- // free(temp);
- // } else {
- // int size;
- // config_str hash = yon_config_load(yon_debug_output("%s\n",!strcmp(encryption,"sha512")?sha512_encrypt_command(password):sha256_encrypt_command(password)),&size);
- // yon_char_remove_last_symbol(hash[0],'\n');
- // char *temp = yon_char_unite(encryption,"|",hash[0],NULL);
- // gtk_entry_set_text(GTK_ENTRY(target),temp);
- // yon_char_parsed_free(hash,size);
- // free(temp);
- // }
- // }
-
- // }
-
}
void on_mirror_path_removed(GtkWidget *self, mirror_add_window *window){
@@ -1735,7 +1692,7 @@ web_publication_add_window *yon_web_publication_add_window_new(){
window->SelectionCellRenderer = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"SelectionCellRenderer"));
yon_gtk_entry_set_password_visibility_icon(GTK_ENTRY(window->UserPasswordEntry));
- yon_gtk_entry_block_restricted_symbols(GTK_ENTRY(window->UsernameEntry));
+ yon_gtk_entry_block_symbols(GTK_ENTRY(window->UsernameEntry),"$");
window->name=NULL;
g_signal_connect(G_OBJECT(window->SelectionCellRenderer),"toggled",G_CALLBACK(on_cell_renderer_toggle_toggled),window->RepositoriesTree);
g_signal_connect(G_OBJECT(window->PathButton),"clicked",G_CALLBACK(on_file_chooser_open),window->PathEntry);
@@ -1823,7 +1780,7 @@ mirror_add_window *yon_mirror_add_window_new(){
window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton");
window->HeadLabel = yon_gtk_builder_get_widget(builder,"HeadLabel");
window->PathBox = yon_gtk_builder_get_widget(builder,"PathBox");
- yon_gtk_entry_block_restricted_symbols(GTK_ENTRY(window->NameEntry));
+ yon_gtk_entry_block_symbols(GTK_ENTRY(window->NameEntry),"$");
yon_on_entry_set_allowed_symbols(GTK_ENTRY(window->TypeEntry),"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/1234567890!$.#-_()~$&;{}[]|<>^:?+\\,'*`%");
window->sections = NULL;
diff --git a/ubl-settings-update-password.glade b/ubl-settings-update-password.glade
index aceb9ba..3005633 100644
--- a/ubl-settings-update-password.glade
+++ b/ubl-settings-update-password.glade
@@ -174,8 +174,8 @@
0
- Default (None)
- - SHA-512
- - SHA-256
+ - SHA-512
+ - SHA-256
diff --git a/ubl-settings-update_ru.po b/ubl-settings-update_ru.po
index d79e412..6a4ca75 100644
--- a/ubl-settings-update_ru.po
+++ b/ubl-settings-update_ru.po
@@ -619,7 +619,7 @@ msgstr "Не шифровать пароль"
#: source/ubl-strings.h:161
msgid "Password hash:"
-msgstr "Пароль/Хэш пароля"
+msgstr "Хэш пароля:"
#: source/ubl-strings.h:162
msgid "Default (None)"