Skip to content

Commit be3ff84

Browse files
authored
Merge pull request #704 from skoef/simplifyAuthSwitch
use existing function for comparing auth data
2 parents cfc74d9 + f26595f commit be3ff84

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

server/auth_switch_response.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ func (c *Conn) handleAuthSwitchResponse() error {
2424
if err := c.acquirePassword(); err != nil {
2525
return err
2626
}
27-
if !bytes.Equal(CalcPassword(c.salt, []byte(c.password)), authData) {
28-
return errAccessDenied(c.password)
29-
}
30-
return nil
27+
return c.compareNativePasswordAuthData(authData, c.password)
3128

3229
case AUTH_CACHING_SHA2_PASSWORD:
3330
if !c.cachingSha2FullAuth {

0 commit comments

Comments
 (0)