From b33f1c1284d2d5a4bbf481aa2b144af562dba1cc Mon Sep 17 00:00:00 2001 From: guoaomen Date: Tue, 3 Nov 2020 11:26:46 +0800 Subject: [PATCH] fix: inner 648 when auth request is \004 need send switch auth response --- .../services/mysqlauthenticate/MySQLBackAuthService.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/actiontech/dble/services/mysqlauthenticate/MySQLBackAuthService.java b/src/main/java/com/actiontech/dble/services/mysqlauthenticate/MySQLBackAuthService.java index 486c79ee3..153643f45 100644 --- a/src/main/java/com/actiontech/dble/services/mysqlauthenticate/MySQLBackAuthService.java +++ b/src/main/java/com/actiontech/dble/services/mysqlauthenticate/MySQLBackAuthService.java @@ -116,13 +116,8 @@ public class MySQLBackAuthService extends AuthService { case PasswordAuthPlugin.AUTH_SWITCH_MORE: { authSwitchMore = true; //need auth switch for other plugin - AuthSwitchRequestPackage authSwitchRequestPackage = new AuthSwitchRequestPackage(); - authSwitchRequestPackage.read(data); - if (authSwitchRequestPackage.getAuthPluginData() != null && authSwitchRequestPackage.getAuthPluginData().length > 0) { - BinaryPacket binaryPacket = new BinaryPacket(); - binaryPacket.setData(new byte[]{2}); - binaryPacket.setPacketId(++data[3]); - binaryPacket.bufferWrite(connection); + if (data.length > 5 && data[5] == PasswordAuthPlugin.AUTHSTAGE_FULL) { + sendSwitchResponse(new byte[]{2}, ++data[3]); } break; }