From c372d15dfaf3b9e1a630939fa4df2b176deb533e Mon Sep 17 00:00:00 2001 From: Ayush Agarwal Date: Sat, 6 Nov 2021 21:25:58 +0530 Subject: fix: don't parse the 'username' and 'password' key tessen wasn't excluding 'username' and 'password' as a key from the menu which isn't expected behaviour because the value of username is determined from the basename of the selected file and password is selected from the first line of the file --- tessen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tessen') diff --git a/tessen b/tessen index a51c1b5..2b83d53 100755 --- a/tessen +++ b/tessen @@ -61,7 +61,7 @@ get_pass_data() { # skip the password, validate each entry against $passdata_regex, store valid results # ASSUMPTION: each key is unique otherwise, the value of the last non-unique key will be used for idx in "${passdata[@]:1}"; do - if [[ "$idx" =~ $passdata_regex ]]; then + if [[ "${idx%%:*}" != "username" && "${idx%%:*}" != "password" && "$idx" =~ $passdata_regex ]]; then key="${idx%%:*}" val="${idx#*: }" PASSDATA_ARR["$key"]="$val" -- cgit v1.2.3