Skip to content

Commit

Permalink
fix: don't parse the 'username' and 'password' key
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ayushnix committed Nov 6, 2021
1 parent 9c07554 commit c372d15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tessen
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c372d15

Please sign in to comment.