From: Christophe B Billheimer Date: Thu, 9 Sep 2021 02:48:43 +0000 (-0400) Subject: use head instead of tail so that the sessionid cookie gets set correctly X-Git-Tag: 3.0.1~2^2~3^2~24 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=d317b49940adc07fc33f0d2cf0f011e4f1da0e03;p=mirror_acme.sh.git use head instead of tail so that the sessionid cookie gets set correctly --- diff --git a/dnsapi/dns_1984hosting.sh b/dnsapi/dns_1984hosting.sh index d720c1c5..4d5549ab 100755 --- a/dnsapi/dns_1984hosting.sh +++ b/dnsapi/dns_1984hosting.sh @@ -150,7 +150,7 @@ _1984hosting_login() { _debug2 response "$response" if _contains "$response" '"loggedin": true'; then - One984HOSTING_COOKIE="$(grep -i '^set-cookie:' "$HTTP_HEADER" | _tail_n 1 | _egrep_o 'sessionid=[^;]*;' | tr -d ';')" + One984HOSTING_COOKIE="$(grep -i '^set-cookie:' "$HTTP_HEADER" | _head_n 1 | _egrep_o 'sessionid=[^;]*;' | tr -d ';')" export One984HOSTING_COOKIE _saveaccountconf_mutable One984HOSTING_COOKIE "$One984HOSTING_COOKIE" return 0