database-mesh / pisanix

A Database Mesh Project Sponsored by SphereEx
https://www.pisanix.io
Apache License 2.0
281 stars 37 forks source link

fix : we should set password to vec[0] when password is empty in Client Auth Plugin: caching_sha2_password #415

Closed arthur-zhang closed 1 year ago

arthur-zhang commented 1 year ago

fix empty password login issue at caching_sha2_password, or it will fail to connect to empty password backend.

according to MySQL source code sql/auth/sha2_password.cc caching_sha2_password_authenticate, empty password should be set to '\0'

What's Changed:

modify calc_caching_sha2password code to correctly handle empty password

when database has empty password, current calc_caching_sha2password cannot handle it correctly. we should set to vec![0] instead of vec![]

mlycore commented 1 year ago

Thanks for your contribution. Please check your commits status with DCO

arthur-zhang commented 1 year ago

Thanks for your contribution. Please check your commits status with DCO

ok, done