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

server: change the compatibility of tidb_sm3_password #37909

Merged
merged 6 commits into from Sep 19, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions server/conn.go
Expand Up @@ -923,11 +923,6 @@ func (cc *clientConn) checkAuthPlugin(ctx context.Context, resp *handshakeRespon
// method to match the one configured for that specific user.
if (cc.authPlugin != userplugin) || (cc.authPlugin != resp.AuthPlugin) {
if resp.Capability&mysql.ClientPluginAuth > 0 {
// For compatibility, since most mysql client doesn't support 'tidb_sm3_password',
// they can connect to TiDB using a `tidb_sm3_password` user with a 'caching_sha2_password' plugin.
if userplugin == mysql.AuthTiDBSM3Password {
userplugin = mysql.AuthCachingSha2Password
}
authData, err := cc.authSwitchRequest(ctx, userplugin)
if err != nil {
return nil, err
Expand Down