Skip to content

Commit ef91351

Browse files
authored
Fix connection procedure auth-switch wrong plugin auth method. (PyMySQL#582)
2 parents a29347c + 5f6f111 commit ef91351

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
@@ -1183,7 +1183,7 @@ def _process_auth(self, plugin_name, auth_packet):
11831183
handler = None
11841184
if plugin_name == b"mysql_native_password":
11851185
# https://dev.mysql.com/doc/internals/en/secure-password-authentication.html#packet-Authentication::Native41
1186-
data = _scramble(self.password.encode('latin1'), auth_packet.read_all()) + b'\0'
1186+
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
11891189
data = _scramble_323(self.password.encode('latin1'), auth_packet.read_all()) + b'\0'

0 commit comments

Comments
 (0)