diff --git a/postgres-protocol/Cargo.toml b/postgres-protocol/Cargo.toml index 5c7e1147..3ac6acfb 100644 --- a/postgres-protocol/Cargo.toml +++ b/postgres-protocol/Cargo.toml @@ -16,6 +16,6 @@ fallible-iterator = "0.2" hmac = "0.10" md5 = "0.7" memchr = "2.0" -rand = "0.7" +rand = "0.8" sha2 = "0.9" stringprep = "0.1" diff --git a/postgres-protocol/src/authentication/sasl.rs b/postgres-protocol/src/authentication/sasl.rs index 416b4b99..d9547113 100644 --- a/postgres-protocol/src/authentication/sasl.rs +++ b/postgres-protocol/src/authentication/sasl.rs @@ -135,7 +135,7 @@ impl ScramSha256 { let mut rng = rand::thread_rng(); let nonce = (0..NONCE_LENGTH) .map(|_| { - let mut v = rng.gen_range(0x21u8, 0x7e); + let mut v = rng.gen_range(0x21u8..0x7e); if v == 0x2c { v = 0x7e }