diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2021-09-01 10:50:02 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2021-09-01 10:50:02 +0200 |
commit | 2368b5dfb1fbf8a054a6a6fbc42f0bc3e27a28cf (patch) | |
tree | 117189beccf290b9f255ab9c969ed73619a1c8fd | |
parent | d913616f97ca2213e0f98b135d56c9785e449ca7 (diff) |
Fix #24
-rw-r--r-- | client_conn.go | 10 | ||||
-rw-r--r-- | hop.go | 2 | ||||
-rw-r--r-- | server_conn.go | 5 |
3 files changed, 13 insertions, 4 deletions
diff --git a/client_conn.go b/client_conn.go index 228abb9..cb1e6a8 100644 --- a/client_conn.go +++ b/client_conn.go @@ -235,7 +235,10 @@ func handleClt(cc *clientConn) { break } - cc.auth.method = 0 + cc.auth = struct { + method mt.AuthMethods + salt, srpA, srpB, srpM, srpK []byte + }{} if cmd.EmptyPasswd && conf.RequirePasswd { cc.log("<--", "empty password disallowed") @@ -390,7 +393,10 @@ func handleClt(cc *clientConn) { M := srp.ClientProof([]byte(cc.name), cc.auth.salt, cc.auth.srpA, cc.auth.srpB, cc.auth.srpK) if subtle.ConstantTimeCompare(cmd.M, M) == 1 { - cc.auth.method = 0 + cc.auth = struct { + method mt.AuthMethods + salt, srpA, srpB, srpM, srpK []byte + }{} if wantSudo { cc.state++ @@ -59,6 +59,6 @@ func (cc *clientConn) hop(serverName string) error { cc.SendCmd(&mt.ToCltRmHUD{ID: hud}) } - // Stateless packets + // Static parameters return nil } diff --git a/server_conn.go b/server_conn.go index 816e3e5..a4d0812 100644 --- a/server_conn.go +++ b/server_conn.go @@ -179,7 +179,10 @@ func handleSrv(sc *serverConn) { sc.clt = nil } case *mt.ToCltAcceptAuth: - sc.auth.method = 0 + sc.auth = struct { + method mt.AuthMethods + salt, srpA, a, srpK []byte + }{} sc.SendCmd(&mt.ToSrvInit2{Lang: sc.client().lang}) case *mt.ToCltDenySudoMode: sc.log("<--", "deny sudo") |