Skip to content

Commit

Permalink
inwx: Be case insensitive while searching for the cookie.
Browse files Browse the repository at this point in the history
At least since 2023-08-25 the cookie is set via `set-cookie' instead the
expecting `Set-Cookie' string. A month earlier it was working.

Ignore the case while matching the cookie.

Fixes: #4763
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
  • Loading branch information
Sebastian Andrzej Siewior committed Aug 28, 2023
1 parent 0da839c commit 9b0b5bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dnsapi/dns_inwx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ _inwx_login() {

response="$(_post "$xml_content" "$INWX_Api" "" "POST")"

INWX_Cookie=$(printf "Cookie: %s" "$(grep "domrobot=" "$HTTP_HEADER" | grep "^Set-Cookie:" | _tail_n 1 | _egrep_o 'domrobot=[^;]*;' | tr -d ';')")
INWX_Cookie=$(printf "Cookie: %s" "$(grep "domrobot=" "$HTTP_HEADER" | grep -i "^Set-Cookie:" | _tail_n 1 | _egrep_o 'domrobot=[^;]*;' | tr -d ';')")
_H1=$INWX_Cookie
export _H1
export INWX_Cookie
Expand Down

0 comments on commit 9b0b5bc

Please sign in to comment.