deal all auth packet

This commit is contained in:
hebo
2019-11-13 13:47:56 +08:00
parent 1b0d2c8e91
commit 16722c878c
3 changed files with 7 additions and 7 deletions

View File

@@ -25,11 +25,12 @@ func CheckParams() {
}
}
func IsAuthPacket(val byte) bool {
func IsAuthPacket(payload []byte) bool {
switch serviceType {
case ServiceTypeMysql:
return mysql.IsAuthPacket(val)
return len(payload) >= 5 && mysql.IsAuth(payload[4])
default:
return mysql.IsAuthPacket(val)
return false
}
}