Skip to content

Commit 6913157

Browse files
author
Reinier Schoof
committed
fixed access denied error in auth switch response as well
1 parent efe1873 commit 6913157

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/auth_switch_response.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func (c *Conn) handleAuthSwitchResponse() error {
2525
return err
2626
}
2727
if !bytes.Equal(CalcPassword(c.salt, []byte(c.password)), authData) {
28-
return ErrAccessDenied
28+
return errAccessDenied(c.password)
2929
}
3030
return nil
3131

@@ -82,7 +82,7 @@ func (c *Conn) handleCachingSha2PasswordFullAuth(authData []byte) error {
8282
if bytes.Equal(authData, []byte(c.password)) {
8383
return nil
8484
}
85-
return ErrAccessDenied
85+
return errAccessDenied(c.password)
8686
} else {
8787
// client either request for the public key or send the encrypted password
8888
if len(authData) == 1 && authData[0] == 0x02 {
@@ -111,7 +111,7 @@ func (c *Conn) handleCachingSha2PasswordFullAuth(authData []byte) error {
111111
if bytes.Equal(plain, dbytes) {
112112
return nil
113113
}
114-
return ErrAccessDenied
114+
return errAccessDenied(c.password)
115115
}
116116
}
117117

0 commit comments

Comments
 (0)