diff options
Diffstat (limited to 'pinentry-rofi.sh')
-rwxr-xr-x | pinentry-rofi.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pinentry-rofi.sh b/pinentry-rofi.sh index 7f01b2e..2695a88 100755 --- a/pinentry-rofi.sh +++ b/pinentry-rofi.sh @@ -70,7 +70,7 @@ rawurlencode() { esac encoded+="${o}" done - printf "%s" "${encoded}" # You can either set a return variable (FASTER) + printf "%s" "${encoded}" # You can either set a return variable (FASTER) } rawurldecode() { @@ -81,6 +81,11 @@ rawurldecode() { printf '%b' "${1//%/\\x}" } +# Except Assuan apparently doesn't want really encoded strings, but some kind of bastard +basturldecode () { + echo "$1" | sed -e 's/</\</g' -e 's/>/\>/g' +} + rofi_cmd="rofi -dmenu -input /dev/null -password" INSIDE_BATS=${INSIDE_BATS:-0} @@ -164,7 +169,7 @@ while : ; do #SETDESC Please enter the passphrase for the ssh key%0A ke:yf:in:ge:rp:ri:nt IFS=" " line_arr=($(split_line "$line")) log_debug "line_arr: ${line_arr[*]}" - temp_str="$(rawurldecode "${line_arr[*]}")" + temp_str="$(basturldecode "${line_arr[*]}")" log_debug "temp_str: ${temp_str}" win_mesg="$(rawurlencode "${temp_str}")" assuan_send "OK" @@ -178,7 +183,7 @@ while : ; do IFS=" " line_arr=($(split_line "$line")) log_debug "line_arr: ${line_arr[*]}" log_debug "line_arr: ${line_arr[*]}" - temp_str="$(rawurldecode "${line_arr[*]}")" + temp_str="$(basturldecode "${line_arr[*]}")" log_debug "temp_str: ${temp_str}" win_title="$(rawurlencode "${temp_str}")" assuan_send "OK" |