Browse Source
Merge pull request #1437 from james-gibson/remove-line-wraps-on-basic-auth
Disable line wrapping on base64 conversion to prevent auth failure
pull/1459/head
neil
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
dnsapi/dns_namecom.sh
|
@ -123,7 +123,7 @@ _namecom_login() { |
|
|
# Auth string |
|
|
# Auth string |
|
|
# Name.com API v4 uses http basic auth to authenticate |
|
|
# Name.com API v4 uses http basic auth to authenticate |
|
|
# need to convert the token for http auth |
|
|
# need to convert the token for http auth |
|
|
_namecom_auth=$(printf "%s:%s" "$Namecom_Username" "$Namecom_Token" | base64) |
|
|
|
|
|
|
|
|
_namecom_auth=$(printf "%s:%s" "$Namecom_Username" "$Namecom_Token" | _base64) |
|
|
|
|
|
|
|
|
if _namecom_rest GET "hello"; then |
|
|
if _namecom_rest GET "hello"; then |
|
|
retcode=$(printf "%s\n" "$response" | _egrep_o "\"username\"\:\"$Namecom_Username\"") |
|
|
retcode=$(printf "%s\n" "$response" | _egrep_o "\"username\"\:\"$Namecom_Username\"") |
|
|