Skip to content

Commit 5f6f111

Browse files
committed
Old password plugin can accept '\0' value
1 parent f371dd5 commit 5f6f111

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymysql/connections.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ def _process_auth(self, plugin_name, auth_packet):
11861186
data = _scramble(self.password.encode('latin1'), auth_packet.read_all())
11871187
elif plugin_name == b"mysql_old_password":
11881188
# https://dev.mysql.com/doc/internals/en/old-password-authentication.html
1189-
data = _scramble_323(self.password.encode('latin1'), auth_packet.read_all())
1189+
data = _scramble_323(self.password.encode('latin1'), auth_packet.read_all()) + b'\0'
11901190
elif plugin_name == b"mysql_clear_password":
11911191
# https://dev.mysql.com/doc/internals/en/clear-text-authentication.html
11921192
data = self.password.encode('latin1') + b'\0'

0 commit comments

Comments
 (0)