mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-02 15:25:32 +00:00
mysql: infer empty password to mean no password
This commit is contained in:
parent
d3eb9c7800
commit
d820763bb9
@ -134,6 +134,11 @@ async fn make_auth_response(
|
||||
password: &str,
|
||||
nonce: &[u8],
|
||||
) -> crate::Result<Vec<u8>> {
|
||||
if password.is_empty() {
|
||||
// Empty password should not be sent
|
||||
return Ok(vec![]);
|
||||
}
|
||||
|
||||
match plugin {
|
||||
AuthPlugin::CachingSha2Password | AuthPlugin::MySqlNativePassword => {
|
||||
Ok(plugin.scramble(password, nonce))
|
||||
|
Loading…
x
Reference in New Issue
Block a user