@@ -55,8 +55,8 @@ public function authenticate(
5555 $ this ->logger ->debug ('开始验证代理账号 ' , [
5656 'username ' => $ username ,
5757 'database ' => $ database ,
58- 'auth_response_length ' => strlen ($ authResponse ),
59- 'auth_plugin_data_length ' => strlen ($ authPluginData ),
58+ 'auth_response_length ' => mb_strlen ($ authResponse ),
59+ 'auth_plugin_data_length ' => mb_strlen ($ authPluginData ),
6060 ]);
6161
6262 // 查找匹配的代理账号
@@ -73,7 +73,7 @@ public function authenticate(
7373 // 验证密码
7474 $ isValid = $ this ->verifyPassword ($ authResponse , $ account ['password ' ], $ authPluginData );
7575
76- $ this ->logger ->info ('代理账号验证结果 ' , [
76+ $ this ->logger ->info ('代理账号验证结果,密码错误 ' , [
7777 'username ' => $ username ,
7878 'database ' => $ database ,
7979 'is_valid ' => $ isValid ,
@@ -122,8 +122,8 @@ private function verifyPassword(string $clientAuthResponse, string $storedPasswo
122122 $ isValid = hash_equals ($ expectedResponse , $ clientAuthResponse );
123123
124124 $ this ->logger ->debug ('密码验证详情 ' , [
125- 'client_response_length ' => strlen ($ clientAuthResponse ),
126- 'expected_response_length ' => strlen ($ expectedResponse ),
125+ 'client_response_length ' => mb_strlen ($ clientAuthResponse ),
126+ 'expected_response_length ' => mb_strlen ($ expectedResponse ),
127127 'responses_match ' => $ isValid ,
128128 ]);
129129
0 commit comments