]> git.proxmox.com Git - mirror_acme.sh.git/commitdiff
put cookies into a format that the 1984 Hosting website expects
authorChristophe B Billheimer <cbillhei@gmu.edu>
Sun, 12 Sep 2021 16:37:56 +0000 (12:37 -0400)
committerChristophe B Billheimer <cbillhei@gmu.edu>
Sun, 12 Sep 2021 16:37:56 +0000 (12:37 -0400)
dnsapi/dns_1984hosting.sh

index fceb7618475bcc69135e4a6ecc9dbedd28994ad1..d1d7b1541c9543fdc5485e5adb66eadd91ec80b5 100755 (executable)
@@ -229,8 +229,7 @@ _get_zone_id() {
 
 # add extra headers to request
 _authget() {
-  export _H1="Cookie: $One984HOSTING_SESSIONID_COOKIE"
-  export _H2="Cookie: $One984HOSTING_CSRFTOKEN_COOKIE"
+  export _H1="Cookie: $One984HOSTING_CSRFTOKEN_COOKIE;$One984HOSTING_SESSIONID_COOKIE"
   _response=$(_get "$1" | _normalizeJson)
   _debug2 _response "$_response"
 }
@@ -238,14 +237,12 @@ _authget() {
 # truncate huge HTML response
 # echo: Argument list too long
 _htmlget() {
-  export _H1="Cookie: $One984HOSTING_SESSIONID_COOKIE"
-  export _H2="Cookie: $One984HOSTING_CSRFTOKEN_COOKIE"
+  export _H1="Cookie: $One984HOSTING_CSRFTOKEN_COOKIE;$One984HOSTING_SESSIONID_COOKIE"
   _response=$(_get "$1" | grep "$2" | _head_n 1)
 }
 
 # add extra headers to request
 _authpost() {
-  export _H1="Cookie: $One984HOSTING_SESSIONID_COOKIE"
-  export _H2="Cookie: $One984HOSTING_CSRFTOKEN_COOKIE"
+  export _H1="Cookie: $One984HOSTING_CSRFTOKEN_COOKIE;$One984HOSTING_SESSIONID_COOKIE"
   _response=$(_post "$1" "$2")
 }