btrbk-verify: expect single quotes from btrbk raw table output

unsafe-filenames
Axel Burri 2021-08-16 17:55:32 +02:00
parent 81a04e4287
commit af5d25c5a9
1 changed files with 2 additions and 2 deletions

View File

@ -302,7 +302,7 @@ start_ssh_agent()
eval_btrbk_resolved_line()
{
local line=$1
local line=" $1"
local prefix=$2
local required_keys=$3
# reset all variables first
@ -311,7 +311,7 @@ eval_btrbk_resolved_line()
done
for vv in $required_keys; do
# basic input validation, set prefixed variable (eval)
local match="${vv}"'="([^"]*)"'
local match=" ${vv}='([^']*('\\\\''[^']*)*)'"
if [[ $line =~ $match ]] ; then
eval "${prefix}${vv}='${BASH_REMATCH[1]}'" || return 1
else