mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-22 05:01:40 +00:00
Trim double quotes for email and key
Currently dns_cf generates headers like this: 'X-Auth-Email: "sample@mail.com"'. Cloudflare API responses 400 BadRequest for quoted headers with message "Invalid format for X-Auth-Email header".
This commit is contained in:
parent
54f1be69c7
commit
6e917d156c
@ -182,8 +182,11 @@ _cf_rest() {
|
|||||||
data="$3"
|
data="$3"
|
||||||
_debug "$ep"
|
_debug "$ep"
|
||||||
|
|
||||||
export _H1="X-Auth-Email: $CF_Email"
|
email_trimmed=$(echo $CF_Email | tr -d '"')
|
||||||
export _H2="X-Auth-Key: $CF_Key"
|
key_trimmed=$(echo $CF_Key | tr -d '"')
|
||||||
|
|
||||||
|
export _H1="X-Auth-Email: $email_trimmed"
|
||||||
|
export _H2="X-Auth-Key: $key_trimmed"
|
||||||
export _H3="Content-Type: application/json"
|
export _H3="Content-Type: application/json"
|
||||||
|
|
||||||
if [ "$m" != "GET" ]; then
|
if [ "$m" != "GET" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user