chore: 更新 rust 依赖 (#391)
This commit is contained in:
544
Cargo.lock
generated
544
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
26
Cargo.toml
26
Cargo.toml
@@ -24,7 +24,7 @@ async-trait = "0.1.88"
|
|||||||
axum = { version = "0.8.4", features = ["macros", "ws"] }
|
axum = { version = "0.8.4", features = ["macros", "ws"] }
|
||||||
built = { version = "0.7.7", features = ["git2", "chrono"] }
|
built = { version = "0.7.7", features = ["git2", "chrono"] }
|
||||||
chrono = { version = "0.4.41", features = ["serde"] }
|
chrono = { version = "0.4.41", features = ["serde"] }
|
||||||
clap = { version = "4.5.38", features = ["env", "string"] }
|
clap = { version = "4.5.41", features = ["env", "string"] }
|
||||||
cookie = "0.18.1"
|
cookie = "0.18.1"
|
||||||
cow-utils = "0.1.3"
|
cow-utils = "0.1.3"
|
||||||
dashmap = "6.1.0"
|
dashmap = "6.1.0"
|
||||||
@@ -36,15 +36,15 @@ git2 = { version = "0.20.2", features = [], default-features = false }
|
|||||||
handlebars = "6.3.2"
|
handlebars = "6.3.2"
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
leaky-bucket = "1.1.2"
|
leaky-bucket = "1.1.2"
|
||||||
md5 = "0.7.0"
|
md5 = "0.8.0"
|
||||||
memchr = "2.7.4"
|
memchr = "2.7.5"
|
||||||
once_cell = "1.21.3"
|
once_cell = "1.21.3"
|
||||||
parking_lot = "0.12.4"
|
parking_lot = "0.12.4"
|
||||||
prost = "0.13.5"
|
prost = "0.14.1"
|
||||||
quick-xml = { version = "0.37.5", features = ["async-tokio"] }
|
quick-xml = { version = "0.38.0", features = ["async-tokio"] }
|
||||||
rand = "0.8.5"
|
rand = "0.9.1"
|
||||||
regex = "1.11.1"
|
regex = "1.11.1"
|
||||||
reqwest = { version = "0.12.15", features = [
|
reqwest = { version = "0.12.22", features = [
|
||||||
"charset",
|
"charset",
|
||||||
"cookies",
|
"cookies",
|
||||||
"gzip",
|
"gzip",
|
||||||
@@ -53,24 +53,24 @@ reqwest = { version = "0.12.15", features = [
|
|||||||
"rustls-tls",
|
"rustls-tls",
|
||||||
"stream",
|
"stream",
|
||||||
], default-features = false }
|
], default-features = false }
|
||||||
rsa = { version = "0.9.8", features = ["sha2"] }
|
rsa = { version = "0.10.0-rc.3", features = ["sha2"] }
|
||||||
rust-embed-for-web = { git = "https://github.com/amtoaer/rust-embed-for-web", tag = "v1.0.0" }
|
rust-embed-for-web = { git = "https://github.com/amtoaer/rust-embed-for-web", tag = "v1.0.0" }
|
||||||
sea-orm = { version = "1.1.11", features = [
|
sea-orm = { version = "1.1.13", features = [
|
||||||
"macros",
|
"macros",
|
||||||
"runtime-tokio-rustls",
|
"runtime-tokio-rustls",
|
||||||
"sqlx-sqlite",
|
"sqlx-sqlite",
|
||||||
] }
|
] }
|
||||||
sea-orm-migration = { version = "1.1.11", features = [] }
|
sea-orm-migration = { version = "1.1.13", features = [] }
|
||||||
serde = { version = "1.0.219", features = ["derive"] }
|
serde = { version = "1.0.219", features = ["derive"] }
|
||||||
serde_json = "1.0.140"
|
serde_json = "1.0.140"
|
||||||
serde_urlencoded = "0.7.1"
|
serde_urlencoded = "0.7.1"
|
||||||
strum = { version = "0.27.1", features = ["derive"] }
|
strum = { version = "0.27.1", features = ["derive"] }
|
||||||
sysinfo = "0.35.2"
|
sysinfo = "0.36.0"
|
||||||
thiserror = "2.0.12"
|
thiserror = "2.0.12"
|
||||||
tokio = { version = "1.45.0", features = ["full"] }
|
tokio = { version = "1.46.1", features = ["full"] }
|
||||||
tokio-stream = { version = "0.1.17", features = ["sync"] }
|
tokio-stream = { version = "0.1.17", features = ["sync"] }
|
||||||
tokio-util = { version = "0.7.15", features = ["io", "rt"] }
|
tokio-util = { version = "0.7.15", features = ["io", "rt"] }
|
||||||
toml = "0.8.22"
|
toml = "0.9.1"
|
||||||
tower = "0.5.2"
|
tower = "0.5.2"
|
||||||
tracing = "0.1.41"
|
tracing = "0.1.41"
|
||||||
tracing-subscriber = { version = "0.3.19", features = ["chrono", "json"] }
|
tracing-subscriber = { version = "0.3.19", features = ["chrono", "json"] }
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ JNrRuoEUXpabUzGB8QIDAQAB
|
|||||||
.expect("fail to decode public key");
|
.expect("fail to decode public key");
|
||||||
let ts = chrono::Local::now().timestamp_millis();
|
let ts = chrono::Local::now().timestamp_millis();
|
||||||
let data = format!("refresh_{}", ts).into_bytes();
|
let data = format!("refresh_{}", ts).into_bytes();
|
||||||
let mut rng = rand::rngs::OsRng;
|
let mut rng = rand::rng();
|
||||||
let encrypted = key
|
let encrypted = key
|
||||||
.encrypt(&mut rng, Oaep::new::<Sha256>(), &data)
|
.encrypt(&mut rng, Oaep::new::<Sha256>(), &data)
|
||||||
.expect("fail to encrypt");
|
.expect("fail to encrypt");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use rand::seq::SliceRandom;
|
use rand::seq::IndexedRandom;
|
||||||
|
|
||||||
pub(super) fn default_time_format() -> String {
|
pub(super) fn default_time_format() -> String {
|
||||||
"%Y-%m-%d".to_string()
|
"%Y-%m-%d".to_string()
|
||||||
@@ -7,7 +7,7 @@ pub(super) fn default_time_format() -> String {
|
|||||||
/// 默认的 auth_token 实现,生成随机 16 位字符串
|
/// 默认的 auth_token 实现,生成随机 16 位字符串
|
||||||
pub(super) fn default_auth_token() -> String {
|
pub(super) fn default_auth_token() -> String {
|
||||||
let byte_choices = b"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+-=";
|
let byte_choices = b"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+-=";
|
||||||
let mut rng = rand::thread_rng();
|
let mut rng = rand::rng();
|
||||||
(0..16)
|
(0..16)
|
||||||
.map(|_| *(byte_choices.choose(&mut rng).expect("choose byte failed")) as char)
|
.map(|_| *(byte_choices.choose(&mut rng).expect("choose byte failed")) as char)
|
||||||
.collect()
|
.collect()
|
||||||
|
|||||||
Reference in New Issue
Block a user