Skip to content

Commit 0a1ea2d

Browse files
author
Reinier Schoof
committed
fixed access denied error on empty auth data
1 parent e754fd1 commit 0a1ea2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/handshake_resp.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func (c *Conn) readAuthData(data []byte, pos int) (auth []byte, authLen int, new
148148
}
149149
if isNULL {
150150
// no auth length and no auth data, just \NUL, considered invalid auth data, and reject connection as MySQL does
151-
return nil, 0, 0, NewDefaultError(ER_ACCESS_DENIED_ERROR, c.RemoteAddr().String(), c.user, MySQLErrName[ER_NO])
151+
return nil, 0, 0, NewDefaultError(ER_ACCESS_DENIED_ERROR, c.user, c.RemoteAddr().String(), MySQLErrName[ER_NO])
152152
}
153153
auth = authData
154154
authLen = readBytes

0 commit comments

Comments
 (0)