aboutsummaryrefslogtreecommitdiffstats
path: root/src/e_keys.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-04-25 20:20:20 +0200
committerJoe <rbo@gmx.us>2024-04-25 20:20:20 +0200
commitfa7c568ae3884740a260cb6f3ebfd17c08c6130b (patch)
tree5e6b6b446077b8bdfffd44b3c540e4f04641fdab /src/e_keys.go
parentuseless (diff)
downloadhardflip-fa7c568ae3884740a260cb6f3ebfd17c08c6130b.tar.gz
hardflip-fa7c568ae3884740a260cb6f3ebfd17c08c6130b.tar.bz2
hardflip-fa7c568ae3884740a260cb6f3ebfd17c08c6130b.tar.xz
hardflip-fa7c568ae3884740a260cb6f3ebfd17c08c6130b.tar.zst
hardflip-fa7c568ae3884740a260cb6f3ebfd17c08c6130b.zip
fixes
Diffstat (limited to '')
-rw-r--r--src/e_keys.go17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/e_keys.go b/src/e_keys.go
index ae016b1..ee6c66e 100644
--- a/src/e_keys.go
+++ b/src/e_keys.go
@@ -649,8 +649,13 @@ func e_insert_events(data *HardData, ui *HardUI, event tcell.EventKey) bool {
case INS_SSH_PASS,
INS_RDP_PASS,
INS_OS_PASS:
- data.insert.Pass, _ = c_encrypt_str(ui.buff,
- data.opts.GPG)
+ if len(ui.buff) == 0 {
+ data.insert.Pass = ""
+ return true
+ } else {
+ data.insert.Pass, _ = c_encrypt_str(ui.buff,
+ data.opts.GPG)
+ }
case INS_SSH_PRIV: data.insert.Priv = ui.buff
case INS_SSH_JUMP_HOST,
INS_RDP_JUMP_HOST + len(data.insert.Drive):
@@ -669,8 +674,12 @@ func e_insert_events(data *HardData, ui *HardUI, event tcell.EventKey) bool {
data.insert.Jump.User = ui.buff
case INS_SSH_JUMP_PASS,
INS_RDP_JUMP_PASS + len(data.insert.Drive):
- data.insert.Jump.Pass, _ =
- c_encrypt_str(ui.buff, data.opts.GPG)
+ if len(ui.buff) == 0 {
+ data.insert.Jump.Pass = ""
+ } else {
+ data.insert.Jump.Pass, _ = c_encrypt_str(ui.buff,
+ data.opts.GPG)
+ }
case INS_SSH_JUMP_PRIV,
INS_RDP_JUMP_PRIV + len(data.insert.Drive):
data.insert.Jump.Priv = ui.buff