Skip to content

Conversation

@rophy
Copy link

@rophy rophy commented Jan 6, 2026

See MariaDB/server#4534

Add CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA support to send_change_user_packet()
to allow passwords longer than 255 bytes in COM_CHANGE_USER packets.

Previously, send_change_user_packet() only supported single-byte length
encoding (max 255 bytes), while send_client_reply_packet() supported LENENC.
This caused mysql_change_user() to fail with long passwords when the
connection used cleartext auth directly (without auth plugin switching).

Note: This fix requires a corresponding server-side fix in
parse_com_change_user_packet() to parse LENENC-encoded passwords.

Add CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA support to send_change_user_packet()
to allow passwords longer than 255 bytes in COM_CHANGE_USER packets.

Previously, send_change_user_packet() only supported single-byte length
encoding (max 255 bytes), while send_client_reply_packet() supported LENENC.
This caused mysql_change_user() to fail with long passwords when the
connection used cleartext auth directly (without auth plugin switching).

Note: This fix requires a corresponding server-side fix in
parse_com_change_user_packet() to parse LENENC-encoded passwords.

Added test case test_change_user_long_pw to verify mysql_change_user()
works with 260-byte passwords.
@rophy rophy force-pushed the fix/MDEV-38431-lenenc-change-user branch from f9590ff to 057000e Compare January 15, 2026 22:25
@rophy rophy changed the title MDEV-38431: add LENENC support for COM_CHANGE_USER MDEV-38550: add LENENC support for COM_CHANGE_USER Jan 15, 2026
@vuvova vuvova self-requested a review January 29, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant