mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-05 16:54:50 +00:00
Support sending passwords in cleartext
This commit is contained in:
parent
fda6d9ef81
commit
3bb8c17c57
@ -78,6 +78,10 @@ impl Connection {
|
|||||||
// there is no password needed
|
// there is no password needed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ServerMessage::AuthenticationCleartextPassword => {
|
||||||
|
conn.send(PasswordMessage { password: options.password.unwrap_or_default() }).await?;
|
||||||
|
}
|
||||||
|
|
||||||
ServerMessage::AuthenticationMd5Password(body) => {
|
ServerMessage::AuthenticationMd5Password(body) => {
|
||||||
// Hash password|username
|
// Hash password|username
|
||||||
// FIXME: ConnectOptions should prepare a default user
|
// FIXME: ConnectOptions should prepare a default user
|
||||||
|
@ -76,6 +76,7 @@ impl Message {
|
|||||||
|
|
||||||
b'R' => match BigEndian::read_i32(&buf[idx..]) {
|
b'R' => match BigEndian::read_i32(&buf[idx..]) {
|
||||||
0 => Message::AuthenticationOk,
|
0 => Message::AuthenticationOk,
|
||||||
|
3 => Message::AuthenticationCleartextPassword,
|
||||||
5 => Message::AuthenticationMd5Password(AuthenticationMd5Password {
|
5 => Message::AuthenticationMd5Password(AuthenticationMd5Password {
|
||||||
salt: buf.slice_from(idx + 4),
|
salt: buf.slice_from(idx + 4),
|
||||||
}),
|
}),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user