Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
9499a114
Unverified
Commit
9499a114
authored
Jan 30, 2017
by
Armando Lüscher
Browse files
Remove custom URL encoding and use library's implementation.
parent
6e8dcdce
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_cyon.sh
View file @
9499a114
...
...
@@ -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
}
"
)
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment