|
|
|
|
@ -1208,31 +1208,26 @@ void on_web_publish_accept(GtkWidget *, dictionary *dict){
|
|
|
|
|
char *user_password = yon_char_new((char*)gtk_entry_get_text(GTK_ENTRY(window->UserPasswordEntry)));
|
|
|
|
|
char *encryption = user_password[6]=='|'?yon_char_divide(user_password,6):NULL;
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (strpbrk(username,"!@#%^&*\'")){
|
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),ENTRY_RESTRICTED_SYMBOL_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->UsernameEntry);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (strpbrk(user_password,"!@#%^&*\'")){
|
|
|
|
|
if (username_check&&strpbrk(user_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->UserPasswordEntry);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (encryption&&!yon_char_is_empty(encryption)&&(strlen(user_password)!=128&&strlen(user_password)!=64)){
|
|
|
|
|
if (username_check&&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);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (username_check&>k_combo_box_get_active(GTK_COMBO_BOX(window->UserPasswordCombo))&&yon_char_is_empty(user_password)){
|
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->UserPasswordEntry);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
char *name = (char*)gtk_entry_get_text(GTK_ENTRY(window->PathEntry));
|
|
|
|
|
char *full_name = "";
|
|
|
|
|
@ -1416,7 +1411,7 @@ char *yon_password_hash_get(password_window *window){
|
|
|
|
|
const char *encription = gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->EncryptionCombo));
|
|
|
|
|
const char *hash = gtk_entry_get_text(GTK_ENTRY(window->PasswordHashEntry));
|
|
|
|
|
if (!yon_char_is_empty(hash)){
|
|
|
|
|
if (strlen(hash)!=128||strlen(hash)!=64){
|
|
|
|
|
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 NULL;
|
|
|
|
|
|