Skip to content

Commit c0dc8ad

Browse files
committed
BUG22873551: Fix cleartext authentication issue
Patch provided by contributor. Unit Tests cannot be added for this patch because it includes setting up an account to authenticate via PAM.
1 parent e792978 commit c0dc8ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mysql/connector/protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ def parse_auth_switch_request(self, packet):
718718
"Failed parsing AuthSwitchRequest packet")
719719

720720
(packet, plugin_name) = utils.read_string(packet[5:], end=b'\x00')
721-
if packet[-1] == 0:
721+
if packet and packet[-1] == 0:
722722
packet = packet[:-1]
723723

724724
return plugin_name.decode('utf8'), packet

0 commit comments

Comments
 (0)