Browse Source

Remove custom URL encoding and use library's implementation.

pull/414/head
Armando Lüscher 8 years ago
parent
commit
9499a1142b
No known key found for this signature in database GPG Key ID: 3D71085D14920359
  1. 13
      dnsapi/dns_cyon.sh

13
dnsapi/dns_cyon.sh

@ -79,11 +79,6 @@ _cyon_is_idn() {
[ "$_idn_temp" ] || [ "$_idn_temp2" ]
}
# comment on https://stackoverflow.com/a/10797966
_cyon_urlencode() {
curl -Gso /dev/null -w "%{url_effective}" --data-urlencode @- "" | cut -c 3-
}
_cyon_load_parameters() {
# Read the required parameters to add the TXT entry.
fulldomain="$(printf "%s" "${1}" | tr '[A-Z]' '[a-z]')"
@ -140,8 +135,8 @@ _cyon_get_cookie_header() {
_cyon_login() {
_info " - Logging in..."
username_encoded="$(printf "%s" "${CY_Username}" | _cyon_urlencode)"
password_encoded="$(printf "%s" "${CY_Password}" | _cyon_urlencode)"
username_encoded="$(printf "%s" "${CY_Username}" | _url_encode)"
password_encoded="$(printf "%s" "${CY_Password}" | _url_encode)"
login_url="https://my.cyon.ch/auth/index/dologin-async"
login_data="$(printf "%s" "username=${username_encoded}&password=${password_encoded}&pathname=%2F")"
@ -278,8 +273,8 @@ _cyon_delete_txt() {
continue
fi
hash_encoded="$(printf "%s" "${_hash}" | _cyon_urlencode)"
identifier_encoded="$(printf "%s" "${_identifier}" | _cyon_urlencode)"
hash_encoded="$(printf "%s" "${_hash}" | _url_encode)"
identifier_encoded="$(printf "%s" "${_identifier}" | _url_encode)"
delete_txt_url="https://my.cyon.ch/domain/dnseditor/delete-record-async"
delete_txt_data="$(printf "%s" "hash=${hash_encoded}&identifier=${identifier_encoded}")"

Loading…
Cancel
Save