]> git.proxmox.com Git - mirror_acme.sh.git/commitdiff
use head instead of tail so that the sessionid cookie gets set correctly
authorChristophe B Billheimer <cbillhei@gmu.edu>
Thu, 9 Sep 2021 02:48:43 +0000 (22:48 -0400)
committerChristophe B Billheimer <cbillhei@gmu.edu>
Thu, 9 Sep 2021 02:48:43 +0000 (22:48 -0400)
dnsapi/dns_1984hosting.sh

index d720c1c5741de195dfd461281cd0901200566130..4d5549abf34ef08a85090765cbedf4370ba4a5ba 100755 (executable)
@@ -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