From 7926549207b684cf21ffda4c517da07caaf3d874 Mon Sep 17 00:00:00 2001 From: Reinier Schoof Date: Fri, 24 Jun 2022 16:48:02 +0200 Subject: [PATCH] use existing function for comparing auth data --- server/auth_switch_response.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/server/auth_switch_response.go b/server/auth_switch_response.go index 209598909..835cf7bab 100644 --- a/server/auth_switch_response.go +++ b/server/auth_switch_response.go @@ -24,10 +24,7 @@ func (c *Conn) handleAuthSwitchResponse() error { if err := c.acquirePassword(); err != nil { return err } - if !bytes.Equal(CalcPassword(c.salt, []byte(c.password)), authData) { - return errAccessDenied(c.password) - } - return nil + return c.compareNativePasswordAuthData(authData, c.password) case AUTH_CACHING_SHA2_PASSWORD: if !c.cachingSha2FullAuth {