Skip to content

Commit 61bccb0

Browse files
committed
BUG#36577957: Update charset/collation description indicate this is 16 bits
This patch fixes the issue where Connector/Python violates the MySQL Connection Protocol while authenticating or setting up SSL before entering the authentication phase by setting 2 bytes instead of 1 for charset option in the response packet. Change-Id: Ib2ddfad4acdd119255f44ee0b56410429b9e86f8
1 parent e6b927a commit 61bccb0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ v9.1.0
1919
- WL#16307: Remove Python 3.8 support
2020
- WL#16306: Add support for Python 3.13
2121
- BUG#37013057: mysql-connector-python Parameterized query SQL injection
22+
- BUG#36577957: Update charset/collation description indicate this is 16 bits
2223

2324
v9.0.0
2425
======

mysql-connector-python/lib/mysql/connector/protocol.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,8 @@ def make_auth_ssl(
428428
[
429429
utils.int4store(client_flags),
430430
utils.int4store(max_allowed_packet),
431-
utils.int2store(charset),
432-
b"\x00" * 22,
431+
utils.int1store(charset),
432+
b"\x00" * 23,
433433
]
434434
)
435435

0 commit comments

Comments
 (0)