mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-22 22:34:05 -07:00
Update url grep to https:// to prevent matching on token
I came across the issue where the token contains `url` in the string, which leads to grep matching on both url and token causing the `query_le_v2` to fail because the first parsed argument is the url which is separated by a newline and the token. This eventually leads to error 15 while requesting a certificate. After some debugging I found what the issue was. Therefore I'm proposing to make the grep more strict on `https://`.
This commit is contained in:
parent
e0ebf729f3
commit
badb7bc4d4
1 changed files with 1 additions and 1 deletions
|
@ -137,7 +137,7 @@ fi
|
||||||
for auth in $authz; do
|
for auth in $authz; do
|
||||||
payload=''
|
payload=''
|
||||||
answer=$(query_le_v2 "$auth" "$payload" "$nonce")
|
answer=$(query_le_v2 "$auth" "$payload" "$nonce")
|
||||||
url=$(echo "$answer" |grep -A3 $proto |grep url |cut -f 4 -d \")
|
url=$(echo "$answer" |grep -A3 $proto |grep "https://" |cut -f 4 -d \")
|
||||||
token=$(echo "$answer" |grep -A3 $proto |grep token |cut -f 4 -d \")
|
token=$(echo "$answer" |grep -A3 $proto |grep token |cut -f 4 -d \")
|
||||||
nonce=$(echo "$answer" |grep -i nonce |cut -f2 -d \ |tr -d '\r\n')
|
nonce=$(echo "$answer" |grep -i nonce |cut -f2 -d \ |tr -d '\r\n')
|
||||||
status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
|
status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue