Skip to content

Commit f62f523

Browse files
authored
Fix auth errors when username/password are too long (#1482) (#1625)
1 parent fc64d3f commit f62f523

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ ICHINOSE Shogo <shogo82148 at gmail.com>
5151
Ilia Cimpoes <ichimpoesh at gmail.com>
5252
INADA Naoki <songofacandy at gmail.com>
5353
Jacek Szwec <szwec.jacek at gmail.com>
54+
Jakub Adamus <kratky at zobak.cz>
5455
James Harr <james.harr at gmail.com>
5556
Janek Vedock <janekvedock at comcast.net>
5657
Jason Ng <oblitorum at gmail.com>

Diff for: packets.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ func (mc *mysqlConn) writeHandshakeResponsePacket(authResp []byte, plugin string
392392
// http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::AuthSwitchResponse
393393
func (mc *mysqlConn) writeAuthSwitchPacket(authData []byte) error {
394394
pktLen := 4 + len(authData)
395-
data, err := mc.buf.takeSmallBuffer(pktLen)
395+
data, err := mc.buf.takeBuffer(pktLen)
396396
if err != nil {
397397
// cannot take the buffer. Something must be wrong with the connection
398398
mc.log(err)

0 commit comments

Comments
 (0)