mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 13:11:32 +00:00
bug-1402776 WIP. Still need to write a test
This commit is contained in:
@@ -4706,11 +4706,14 @@ sub parse_client_handshake_packet {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $code_len = hex($buff_len);
|
my $code_len = hex($buff_len);
|
||||||
|
# The (.*?)00.?\Z part in the regex, is to remove an erroneous
|
||||||
|
# null char + mysql_native_password after the db name
|
||||||
|
# https://bugs.launchpad.net/percona-toolkit/+bug/1402776
|
||||||
my ( $db ) = $data =~ m!
|
my ( $db ) = $data =~ m!
|
||||||
^.{64}${user}00.. # Everything matched before
|
^.{64}${user}00.. # Everything matched before
|
||||||
(?:..){$code_len} # The scramble buffer
|
(?:..){$code_len} # The scramble buffer
|
||||||
(.*)00\Z # The database name
|
(.*?)00.*\Z # The database name
|
||||||
!x;
|
!x;
|
||||||
my $pkt = {
|
my $pkt = {
|
||||||
user => to_string($user),
|
user => to_string($user),
|
||||||
|
Reference in New Issue
Block a user