Skip to content

Commit 7cd6bdd

Browse files
committed
Merge pull request #77 from go-sql-driver/auth-plugin-name
remove auth packet end verification
2 parents d32925b + b8bd3dd commit 7cd6bdd

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

packets.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,15 @@ func (mc *mysqlConn) readInitPacket() (err error) {
187187
// which is not documented but seems to work.
188188
mc.cipher = append(mc.cipher, data[pos:pos+12]...)
189189

190-
if data[len(data)-1] == 0 {
191-
return
192-
}
193-
return errMalformPkt
190+
// TODO: Verify string termination
191+
// EOF if version (>= 5.5.7 and < 5.5.10) or (>= 5.6.0 and < 5.6.2)
192+
// \NUL otherwise
193+
// http://dev.mysql.com/doc/internals/en/connection-phase.html#packet-Protocol::Handshake
194+
//
195+
//if data[len(data)-1] == 0 {
196+
// return
197+
//}
198+
//return errMalformPkt
194199
}
195200

196201
return

0 commit comments

Comments
 (0)