mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 04:46:29 +03:00
Merge pull request #3894 from deltachat/dependabot/cargo/base64-0.20.0
This commit is contained in:
8
Cargo.lock
generated
8
Cargo.lock
generated
@@ -371,6 +371,12 @@ version = "0.13.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
|
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "base64"
|
||||||
|
version = "0.20.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "base64ct"
|
name = "base64ct"
|
||||||
version = "1.5.1"
|
version = "1.5.1"
|
||||||
@@ -877,7 +883,7 @@ dependencies = [
|
|||||||
"async-smtp",
|
"async-smtp",
|
||||||
"async_zip",
|
"async_zip",
|
||||||
"backtrace",
|
"backtrace",
|
||||||
"base64 0.13.1",
|
"base64 0.20.0",
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"chrono",
|
"chrono",
|
||||||
"criterion",
|
"criterion",
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ trust-dns-resolver = "0.22"
|
|||||||
tokio = { version = "1", features = ["fs", "rt-multi-thread", "macros"] }
|
tokio = { version = "1", features = ["fs", "rt-multi-thread", "macros"] }
|
||||||
tokio-tar = { version = "0.3" } # TODO: integrate tokio into async-tar
|
tokio-tar = { version = "0.3" } # TODO: integrate tokio into async-tar
|
||||||
backtrace = "0.3"
|
backtrace = "0.3"
|
||||||
base64 = "0.13"
|
base64 = "0.20"
|
||||||
bitflags = "1.3"
|
bitflags = "1.3"
|
||||||
chrono = { version = "0.4", default-features=false, features = ["clock", "std"] }
|
chrono = { version = "0.4", default-features=false, features = ["clock", "std"] }
|
||||||
dirs = { version = "4", optional=true }
|
dirs = { version = "4", optional=true }
|
||||||
|
|||||||
@@ -277,6 +277,12 @@ async fn maybe_warn_on_outdated(context: &Context, now: i64, approx_compile_time
|
|||||||
/// - for INCOMING messages, the ID is taken from the Chat-Group-ID-header or from the Message-ID in the In-Reply-To: or References:-Header
|
/// - for INCOMING messages, the ID is taken from the Chat-Group-ID-header or from the Message-ID in the In-Reply-To: or References:-Header
|
||||||
/// - the group-id should be a string with the characters [a-zA-Z0-9\-_]
|
/// - the group-id should be a string with the characters [a-zA-Z0-9\-_]
|
||||||
pub(crate) fn create_id() -> String {
|
pub(crate) fn create_id() -> String {
|
||||||
|
const URL_SAFE_ENGINE: base64::engine::fast_portable::FastPortable =
|
||||||
|
base64::engine::fast_portable::FastPortable::from(
|
||||||
|
&base64::alphabet::URL_SAFE,
|
||||||
|
base64::engine::fast_portable::NO_PAD,
|
||||||
|
);
|
||||||
|
|
||||||
// ThreadRng implements CryptoRng trait and is supposed to be cryptographically secure.
|
// ThreadRng implements CryptoRng trait and is supposed to be cryptographically secure.
|
||||||
let mut rng = thread_rng();
|
let mut rng = thread_rng();
|
||||||
|
|
||||||
@@ -285,7 +291,7 @@ pub(crate) fn create_id() -> String {
|
|||||||
rng.fill(&mut arr[..]);
|
rng.fill(&mut arr[..]);
|
||||||
|
|
||||||
// Take 11 base64 characters containing 66 random bits.
|
// Take 11 base64 characters containing 66 random bits.
|
||||||
base64::encode_config(arr, base64::URL_SAFE)
|
base64::encode_engine(arr, &URL_SAFE_ENGINE)
|
||||||
.chars()
|
.chars()
|
||||||
.take(11)
|
.take(11)
|
||||||
.collect()
|
.collect()
|
||||||
|
|||||||
Reference in New Issue
Block a user