diff --git a/src/libply-splash-core/ply-boot-splash.c b/src/libply-splash-core/ply-boot-splash.c index 900bf9f7..ab3d322d 100644 --- a/src/libply-splash-core/ply-boot-splash.c +++ b/src/libply-splash-core/ply-boot-splash.c @@ -845,3 +845,4 @@ ply_boot_splash_uses_pixel_displays (ply_boot_splash_t *splash) { return splash->plugin_interface->add_pixel_display != NULL; } + diff --git a/src/libply-splash-core/ply-keyboard.h b/src/libply-splash-core/ply-keyboard.h index 8bd1d46b..cb88ae8a 100644 --- a/src/libply-splash-core/ply-keyboard.h +++ b/src/libply-splash-core/ply-keyboard.h @@ -85,3 +85,4 @@ bool ply_keyboard_get_capslock_state (ply_keyboard_t *keyboard); #endif #endif /* PLY_KEYBOARD_H */ + diff --git a/src/main.c b/src/main.c index c7778a9f..ddbd7df9 100644 --- a/src/main.c +++ b/src/main.c @@ -1613,9 +1613,7 @@ handle_ply_entry_trigger_type_password (state_t *state, return; } - /* Safely copy raw bytes to password_copy and ensure null-termination */ memcpy (password_copy, raw_bytes, raw_size); - password_copy[raw_size] = '\0'; ply_trace ("WARNING: cleartext password display enabled"); ply_boot_splash_display_password_clear_text (state->boot_splash, @@ -1731,16 +1729,8 @@ static void on_tab_pressed (state_t *state) { ply_trace ("tab key pressed"); - bool has_vt_consoles = true; - if (state->local_console_terminal != NULL) { - if (!ply_terminal_is_vt (state->local_console_terminal)) - has_vt_consoles = false; - } else { - has_vt_consoles = false; - } - - if (validate_input (state, "", "\t") && has_vt_consoles == true) + if (validate_input (state, "", "\t")) toggle_between_bullets_and_clear_text (state); } diff --git a/src/plugins/splash/two-step/plugin.c b/src/plugins/splash/two-step/plugin.c index cb62a0f1..1ae088ed 100644 --- a/src/plugins/splash/two-step/plugin.c +++ b/src/plugins/splash/two-step/plugin.c @@ -2264,7 +2264,10 @@ display_password_clear_text (ply_boot_splash_plugin_t *plugin, if (!plugin->allow_password_clear_text_toggle) { // if function is disabled, fall back to masked bullet mode, // as dynamically setting function to NULL is not possible - display_password_internal (plugin, prompt, NULL, 0); + int bullets = ply_utf8_string_get_length (entry_text, + strlen (entry_text)); + bullets = MAX (0, bullets); + display_password_internal (plugin, prompt, NULL, bullets); return; } display_password_internal (plugin, prompt, entry_text, -1); @@ -2430,3 +2433,4 @@ ply_boot_splash_plugin_get_interface (void) return &plugin_interface; } +