diff options
| author | Soispha Peetz <soispha@b-peetz.de> | 2026-11-13 22:50:22 +0100 |
|---|---|---|
| committer | Soispha Peetz <soispha@b-peetz.de> | 2026-11-13 22:50:22 +0100 |
| commit | d0780853a46aedb174a1fce6a66c55c4a926c93e (patch) | |
| tree | 7ae94b41d5a0ae52f0765a160b93bae5703369ad /crates | |
| parent | build(Cargo.{lock,toml},flake.lock): Update (diff) | |
| download | server-d0780853a46aedb174a1fce6a66c55c4a926c93e.zip | |
build(Cargo.{lock,toml},flake.lock): Update
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/rocie-cli/Cargo.toml | 6 | ||||
| -rw-r--r-- | crates/rocie-client/Cargo.toml | 4 | ||||
| -rw-r--r-- | crates/rocie-server/Cargo.toml | 20 | ||||
| -rw-r--r-- | crates/rocie-server/src/storage/sql/user.rs | 11 |
4 files changed, 18 insertions, 23 deletions
diff --git a/crates/rocie-cli/Cargo.toml b/crates/rocie-cli/Cargo.toml index 1500825..46403ce 100644 --- a/crates/rocie-cli/Cargo.toml +++ b/crates/rocie-cli/Cargo.toml @@ -28,11 +28,11 @@ publish = false workspace = true [dependencies] -anyhow = "1.0.103" -clap = { version = "4.6.2", features = ["derive"] } +anyhow = "1.0.104" +clap = { version = "4.6.7", features = ["derive"] } rocie-client.workspace = true tokio.workspace = true -uuid = "1.24.0" +uuid = "1.29.2" [package.metadata.docs.rs] diff --git a/crates/rocie-client/Cargo.toml b/crates/rocie-client/Cargo.toml index 933dcc0..209bf04 100644 --- a/crates/rocie-client/Cargo.toml +++ b/crates/rocie-client/Cargo.toml @@ -22,7 +22,7 @@ publish = true [dependencies] serde = { version = "^1.0", features = ["derive"] } -serde_with = { version = "^3.21", default-features = false, features = [ +serde_with = { version = "^3.24", default-features = false, features = [ "base64", "std", "macros", @@ -30,7 +30,7 @@ serde_with = { version = "^3.21", default-features = false, features = [ serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" -uuid = { version = "^1.24", features = ["serde", "v4"] } +uuid = { version = "^1.29", features = ["serde", "v4"] } reqwest = { version = "^0.13", default-features = false, features = [ "json", "multipart", diff --git a/crates/rocie-server/Cargo.toml b/crates/rocie-server/Cargo.toml index 8a2e63f..07c2714 100644 --- a/crates/rocie-server/Cargo.toml +++ b/crates/rocie-server/Cargo.toml @@ -34,22 +34,22 @@ tokio.workspace = true [dependencies] actix-identity = "0.9.0" actix-session = { version = "0.11.0", features = ["cookie-session"] } -actix-web = "4.14.0" -argon2 = "0.5.3" +actix-web = "4.19.0" +argon2 = "0.6.0" chrono = "0.4.45" -clap = { version = "4.6.2", features = ["derive", "env"] } -cooklang = "0.18.7" +clap = { version = "4.6.7", features = ["derive", "env"] } +cooklang = "0.19.0" env_logger = "0.11.11" -log = "0.4.33" +log = "0.4.35" percent-encoding = "2.3.2" -serde = { version = "1.0.228", features = ["derive"] } -serde_json = "1.0.150" +serde = { version = "1.0.229", features = ["derive"] } +serde_json = "1.0.154" serde_yaml = "0.9.34" sqlx = { version = "0.8.6", features = ["runtime-tokio", "sqlite"] } -thiserror = "2.0.18" +thiserror = "2.0.21" tokio.workspace = true -utoipa = { version = "5.5.0", features = ["actix_extras", "uuid"] } -uuid = { version = "1.24.0", features = ["v4", "serde"] } +utoipa = { version = "6.0.0", features = ["actix_extras", "uuid"] } +uuid = { version = "1.29.2", features = ["v4", "serde"] } [package.metadata.docs.rs] all-features = true diff --git a/crates/rocie-server/src/storage/sql/user.rs b/crates/rocie-server/src/storage/sql/user.rs index dd0cf06..14fbfcc 100644 --- a/crates/rocie-server/src/storage/sql/user.rs +++ b/crates/rocie-server/src/storage/sql/user.rs @@ -10,10 +10,7 @@ use std::fmt::Display; -use argon2::{ - Argon2, PasswordHasher, PasswordVerifier, - password_hash::{SaltString, rand_core::OsRng}, -}; +use argon2::{Argon2, PasswordHasher, PasswordVerifier}; use serde::{Deserialize, Serialize}; use utoipa::ToSchema; @@ -58,12 +55,10 @@ impl PasswordHash { } pub(crate) fn from_password(password: &str) -> Self { - let salt = SaltString::generate(&mut OsRng); - let argon2 = Argon2::default(); let password_hash = argon2 - .hash_password(password.as_bytes(), &salt) + .hash_password(password.as_bytes()) .expect("to not fail") .to_string(); @@ -81,7 +76,7 @@ impl PasswordHash { .is_ok() } - fn as_argon_hash(&self) -> argon2::PasswordHash<'_> { + fn as_argon_hash(&self) -> argon2::PasswordHash { argon2::PasswordHash::new(&self.value) .expect("to be valid, as we are just deserializing a previously serialize value") } |
