From 0e8ffe7dd298e702e18e7080cf9a77c8652ac8ba Mon Sep 17 00:00:00 2001 From: youngsofun Date: Tue, 12 Apr 2022 14:05:05 +0800 Subject: [PATCH] fix(mysql_handler): salt characters should be ascii. --- query/src/servers/mysql/mysql_interactive_worker.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/query/src/servers/mysql/mysql_interactive_worker.rs b/query/src/servers/mysql/mysql_interactive_worker.rs index c72c71aec023..fac6b796c0fb 100644 --- a/query/src/servers/mysql/mysql_interactive_worker.rs +++ b/query/src/servers/mysql/mysql_interactive_worker.rs @@ -377,7 +377,7 @@ impl InteractiveWorker { let mut scramble: [u8; 20] = [0; 20]; for i in 0..20 { - scramble[i] = bs[i]; + scramble[i] = bs[i] & 0x7fu8; if scramble[i] == b'\0' || scramble[i] == b'$' { scramble[i] += 1; }