Old password plugin can accept '\0' value

This commit is contained in:
lishuode 2017-06-21 08:58:39 +00:00
parent f371dd554d
commit 5f6f111928
1 changed files with 1 additions and 1 deletions

View File

@ -1186,7 +1186,7 @@ class Connection(object):
data = _scramble(self.password.encode('latin1'), auth_packet.read_all())
elif plugin_name == b"mysql_old_password":
# https://dev.mysql.com/doc/internals/en/old-password-authentication.html
data = _scramble_323(self.password.encode('latin1'), auth_packet.read_all())
data = _scramble_323(self.password.encode('latin1'), auth_packet.read_all()) + b'\0'
elif plugin_name == b"mysql_clear_password":
# https://dev.mysql.com/doc/internals/en/clear-text-authentication.html
data = self.password.encode('latin1') + b'\0'