mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed issue #5301, fixed caching_sha2_password full auth
This commit is contained in:
@@ -228,7 +228,7 @@ public class MysqlConnector {
|
|||||||
if (handshakePacket.authPluginName != null && handshakePacket.authPluginName.length > 0) {
|
if (handshakePacket.authPluginName != null && handshakePacket.authPluginName.length > 0) {
|
||||||
authPluginName = new String(handshakePacket.authPluginName);
|
authPluginName = new String(handshakePacket.authPluginName);
|
||||||
}
|
}
|
||||||
logger.info("auth ClientAuthenticationSHA2Packet: {}", authPluginName);
|
logger.info("auth plugin: {}", authPluginName);
|
||||||
boolean isSha2Password = false;
|
boolean isSha2Password = false;
|
||||||
ClientAuthenticationPacket clientAuth;
|
ClientAuthenticationPacket clientAuth;
|
||||||
if ("caching_sha2_password".equals(authPluginName)) {
|
if ("caching_sha2_password".equals(authPluginName)) {
|
||||||
@@ -316,9 +316,6 @@ public class MysqlConnector {
|
|||||||
// fixed issue https://github.com/alibaba/canal/pull/4767, support mysql 8.0.30+
|
// fixed issue https://github.com/alibaba/canal/pull/4767, support mysql 8.0.30+
|
||||||
header = cachingSha2PasswordFullAuth(channel, header, getPassword().getBytes(), scramble);
|
header = cachingSha2PasswordFullAuth(channel, header, getPassword().getBytes(), scramble);
|
||||||
body = PacketManager.readBytes(channel, header.getPacketBodyLength(), timeout);
|
body = PacketManager.readBytes(channel, header.getPacketBodyLength(), timeout);
|
||||||
} else {
|
|
||||||
header = PacketManager.readHeader(channel, 4);
|
|
||||||
body = PacketManager.readBytes(channel, header.getPacketBodyLength(), timeout);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user