Skip to content

Commit d67a99b

Browse files
committed
remove more
1 parent 2aacb6b commit d67a99b

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

pymysql/connections.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -926,16 +926,7 @@ def _request_authentication(self):
926926
# https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::AuthSwitchRequest
927927
auth_packet.read_uint8() # 0xfe packet identifier
928928
plugin_name = auth_packet.read_string()
929-
if (
930-
self.server_capabilities & CLIENT.PLUGIN_AUTH
931-
and plugin_name is not None
932-
):
933-
auth_packet = self._process_auth(plugin_name, auth_packet)
934-
else:
935-
# send legacy handshake
936-
data = _auth.scramble_old_password(self.password, self.salt) + b"\0"
937-
self.write_packet(data)
938-
auth_packet = self._read_packet()
929+
auth_packet = self._process_auth(plugin_name, auth_packet)
939930
elif auth_packet.is_extra_auth_data():
940931
if DEBUG:
941932
print("received extra data")
@@ -973,11 +964,6 @@ def _process_auth(self, plugin_name, auth_packet):
973964
data = _auth.scramble_native_password(self.password, auth_packet.read_all())
974965
elif plugin_name == b"client_ed25519":
975966
data = _auth.ed25519_password(self.password, auth_packet.read_all())
976-
elif plugin_name == b"mysql_old_password":
977-
data = (
978-
_auth.scramble_old_password(self.password, auth_packet.read_all())
979-
+ b"\0"
980-
)
981967
elif plugin_name == b"mysql_clear_password":
982968
# https://dev.mysql.com/doc/internals/en/clear-text-authentication.html
983969
data = self.password + b"\0"

0 commit comments

Comments
 (0)