mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-05 15:57:23 +01:00
Add QA tests for TOTP
This commit is contained in:
@@ -59,7 +59,15 @@ rest_urlencoded() {
|
||||
if $onlydata; then
|
||||
data+=("--data-urlencode" "$item");
|
||||
else
|
||||
data+=("$item")
|
||||
# if argument is like "--header=<val>", then change to
|
||||
# "--header <val>" because curl wants the latter
|
||||
local arg="$(awk -F= '{print $1}' <<<"$item")"
|
||||
local val="$(awk -F= '{print substr($0,length($1)+2)}' <<<"$item")"
|
||||
if [ -z "$val" ]; then
|
||||
data+=("$item")
|
||||
else
|
||||
data+=("$arg" "$val")
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
* )
|
||||
|
||||
Reference in New Issue
Block a user