Update rand to 0.9

This commit is contained in:
Lennart
2025-06-08 19:56:48 +02:00
parent c05c330601
commit 1d25d6cc70
7 changed files with 11 additions and 16 deletions

6
Cargo.lock generated
View File

@@ -2653,7 +2653,6 @@ dependencies = [
"password-hash", "password-hash",
"pbkdf2", "pbkdf2",
"quick-xml", "quick-xml",
"rand 0.8.5",
"reqwest", "reqwest",
"rpassword", "rpassword",
"rustical_caldav", "rustical_caldav",
@@ -2795,7 +2794,7 @@ dependencies = [
"hex", "hex",
"http", "http",
"mime_guess", "mime_guess",
"rand 0.8.5", "rand 0.9.1",
"rust-embed", "rust-embed",
"rustical_oidc", "rustical_oidc",
"rustical_store", "rustical_store",
@@ -2858,7 +2857,7 @@ dependencies = [
"http", "http",
"ical", "ical",
"lazy_static", "lazy_static",
"rand 0.8.5", "rand 0.9.1",
"regex", "regex",
"rrule", "rrule",
"rstest", "rstest",
@@ -2886,7 +2885,6 @@ dependencies = [
"password-auth", "password-auth",
"password-hash", "password-hash",
"pbkdf2", "pbkdf2",
"rand 0.8.5",
"rustical_ical", "rustical_ical",
"rustical_store", "rustical_store",
"serde", "serde",

View File

@@ -106,7 +106,7 @@ rustical_oidc = { path = "./crates/oidc/" }
rustical_ical = { path = "./crates/ical/"} rustical_ical = { path = "./crates/ical/"}
chrono-tz = "0.10" chrono-tz = "0.10"
chrono-humanize = "0.2" chrono-humanize = "0.2"
rand = "0.8" rand = "0.9"
axum-extra = { version = "0.10", features = ["typed-header"] } axum-extra = { version = "0.10", features = ["typed-header"] }
rrule = "0.14" rrule = "0.14"
argon2 = "0.5" argon2 = "0.5"
@@ -158,7 +158,6 @@ tracing-subscriber = { version = "0.3", features = [
] } ] }
figment = { version = "0.10", features = ["env", "toml"] } figment = { version = "0.10", features = ["env", "toml"] }
tower-sessions.workspace = true tower-sessions.workspace = true
rand.workspace = true
rpassword.workspace = true rpassword.workspace = true
tower.workspace = true tower.workspace = true
argon2.workspace = true argon2.workspace = true

View File

@@ -10,13 +10,13 @@ use axum::{
use axum_extra::extract::Host; use axum_extra::extract::Host;
use headers::{ContentType, HeaderMapExt}; use headers::{ContentType, HeaderMapExt};
use http::{HeaderValue, StatusCode, header}; use http::{HeaderValue, StatusCode, header};
use rand::{Rng, distributions::Alphanumeric}; use rand::{Rng, distr::Alphanumeric};
use rustical_store::auth::{AuthenticationProvider, User}; use rustical_store::auth::{AuthenticationProvider, User};
use serde::Deserialize; use serde::Deserialize;
use uuid::Uuid; use uuid::Uuid;
pub fn generate_app_token() -> String { pub fn generate_app_token() -> String {
rand::thread_rng() rand::rng()
.sample_iter(Alphanumeric) .sample_iter(Alphanumeric)
.map(char::from) .map(char::from)
.take(64) .take(64)

View File

@@ -19,6 +19,5 @@ chrono.workspace = true
password-auth.workspace = true password-auth.workspace = true
password-hash.workspace = true password-hash.workspace = true
uuid.workspace = true uuid.workspace = true
rand.workspace = true
pbkdf2.workspace = true pbkdf2.workspace = true
rustical_ical.workspace = true rustical_ical.workspace = true

View File

@@ -1,8 +1,10 @@
use async_trait::async_trait; use async_trait::async_trait;
use derive_more::Constructor; use derive_more::Constructor;
use password_hash::PasswordHasher; use password_hash::PasswordHasher;
use pbkdf2::{Params, password_hash::SaltString}; use pbkdf2::{
use rand::rngs::OsRng; Params,
password_hash::{SaltString, rand_core::OsRng},
};
use rustical_store::{ use rustical_store::{
Error, Secret, Error, Secret,
auth::{AuthenticationProvider, User, user::AppToken}, auth::{AuthenticationProvider, User, user::AppToken},

View File

@@ -1,8 +1,7 @@
use argon2::password_hash::SaltString; use argon2::password_hash::SaltString;
use clap::{Parser, ValueEnum}; use clap::{Parser, ValueEnum};
use password_hash::PasswordHasher; use password_hash::{PasswordHasher, rand_core::OsRng};
use pbkdf2::Params; use pbkdf2::Params;
use rand::rngs::OsRng;
use rustical_frontend::FrontendConfig; use rustical_frontend::FrontendConfig;
use crate::config::{ use crate::config::{

View File

@@ -5,9 +5,7 @@ use figment::{
Figment, Figment,
providers::{Env, Format, Toml}, providers::{Env, Format, Toml},
}; };
use password_hash::PasswordHasher; use password_hash::{PasswordHasher, SaltString, rand_core::OsRng};
use password_hash::SaltString;
use rand::rngs::OsRng;
use rustical_store::auth::{AuthenticationProvider, User, user::PrincipalType}; use rustical_store::auth::{AuthenticationProvider, User, user::PrincipalType};
#[derive(Parser, Debug)] #[derive(Parser, Debug)]