From 60bd1c205e1e1d63df725ef3c450c58837e35cbb Mon Sep 17 00:00:00 2001 From: tony-defa Date: Sat, 17 Sep 2022 18:02:48 +0200 Subject: [PATCH] allinkl: removed deprecated sha1 hashing (#1713) --- providers/dns/allinkl/internal/client.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/providers/dns/allinkl/internal/client.go b/providers/dns/allinkl/internal/client.go index 57d560fe..75eefaff 100644 --- a/providers/dns/allinkl/internal/client.go +++ b/providers/dns/allinkl/internal/client.go @@ -2,7 +2,6 @@ package internal import ( "bytes" - "crypto/sha1" "encoding/json" "encoding/xml" "fmt" @@ -46,9 +45,6 @@ func NewClient(login string, password string) *Client { // - sessionLifetime: Validity of the token in seconds. // - sessionUpdateLifetime: with `true` the session is extended with every request. func (c Client) Authentication(sessionLifetime int, sessionUpdateLifetime bool) (string, error) { - hash := sha1.New() - hash.Write([]byte(c.password)) - sul := "N" if sessionUpdateLifetime { sul = "Y" @@ -56,8 +52,8 @@ func (c Client) Authentication(sessionLifetime int, sessionUpdateLifetime bool) ar := AuthRequest{ Login: c.login, - AuthData: fmt.Sprintf("%x", hash.Sum(nil)), - AuthType: "sha1", + AuthData: c.password, + AuthType: "plain", SessionLifetime: sessionLifetime, SessionUpdateLifetime: sul, }