Skip to content

Commit

Permalink
BUG#36577957: Update charset/collation description indicate this is 1…
Browse files Browse the repository at this point in the history
…6 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
  • Loading branch information
SubCoder1 committed Sep 10, 2024
1 parent e6b927a commit 61bccb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ v9.1.0
- WL#16307: Remove Python 3.8 support
- WL#16306: Add support for Python 3.13
- BUG#37013057: mysql-connector-python Parameterized query SQL injection
- BUG#36577957: Update charset/collation description indicate this is 16 bits

v9.0.0
======
Expand Down
4 changes: 2 additions & 2 deletions mysql-connector-python/lib/mysql/connector/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,8 @@ def make_auth_ssl(
[
utils.int4store(client_flags),
utils.int4store(max_allowed_packet),
utils.int2store(charset),
b"\x00" * 22,
utils.int1store(charset),
b"\x00" * 23,
]
)

Expand Down

0 comments on commit 61bccb0

Please sign in to comment.