From e5a7f104f178fa23cf303a8db1913066b81a05d2 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Tue, 29 Aug 2023 17:18:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=AF=BC=E8=87=B4=E6=97=A0=E6=B3=95=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E6=95=B0=E6=8D=AE=E5=BA=93=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#2108)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/utils/mysql/client.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/backend/utils/mysql/client.go b/backend/utils/mysql/client.go index 75e9a9465..bc829cfd1 100644 --- a/backend/utils/mysql/client.go +++ b/backend/utils/mysql/client.go @@ -8,7 +8,6 @@ import ( "github.com/1Panel-dev/1Panel/backend/buserr" "github.com/1Panel-dev/1Panel/backend/constant" - "github.com/1Panel-dev/1Panel/backend/utils/cmd" "github.com/1Panel-dev/1Panel/backend/utils/mysql/client" ) @@ -28,9 +27,6 @@ type MysqlClient interface { func NewMysqlClient(conn client.DBInfo) (MysqlClient, error) { if conn.From == "local" { - if cmd.CheckIllegal(conn.Address, conn.Username, conn.Password) { - return nil, buserr.New(constant.ErrCmdIllegal) - } connArgs := []string{"exec", conn.Address, "mysql", "-u" + conn.Username, "-p" + conn.Password, "-e"} return client.NewLocal(connArgs, conn.Address, conn.Password, conn.From), nil }