Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use correct charset id with ssl mysql connection initiation #648

Closed
wants to merge 1 commit into from

Conversation

aa-lmoore
Copy link

What do these changes do?

The character set for SSL connections is hard coded to utf8. This breaks encoding charset ids such as utf8mb4 are required. This id should be variable and be set to the charset id used by the connection.

@Nothing4You Nothing4You added this to the 1.0.0 milestone Jan 13, 2022
@Nothing4You Nothing4You modified the milestones: 0.1, 1.0 Feb 18, 2022
@Nothing4You Nothing4You modified the milestones: 1.0, 0.2 Apr 15, 2022
@Nothing4You
Copy link
Collaborator

Hi,

thanks for the PR.

Do you have an example of how this breaks things?
Ideally something to build a test case from?

aiomysql's logic for this is not entirely following PyMySQL's logic, which is something that should be changed independent from this, e.g. it doesn't use PyMySQL's MAX_PACKET_LEN constant for SSL init either.

I might be missing something (and haven't tested anything yet in that regard), but while we do currently hardcode a charset in the Protocol::SSLRequest packet, we send the correct one afterwards in Protocol::HandshakeResponse, which I'd expect (haven't checked) overrides the value initially sent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants