aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-06-05 20:10:49 +0200
committermetamuffin <metamuffin@disroot.org>2023-06-05 20:10:49 +0200
commite9185e5fb133fbf62d7cc86e644d2f9d272ba719 (patch)
tree870a65751620314585471b5ae502dadb231ef621 /server
parentb0d77c36ba632b91d65047716ca0a3e4176eaf4c (diff)
downloadjellything-e9185e5fb133fbf62d7cc86e644d2f9d272ba719.tar
jellything-e9185e5fb133fbf62d7cc86e644d2f9d272ba719.tar.bz2
jellything-e9185e5fb133fbf62d7cc86e644d2f9d272ba719.tar.zst
updatte
Diffstat (limited to 'server')
-rw-r--r--server/Cargo.toml20
-rw-r--r--server/src/routes/ui/account/mod.rs6
2 files changed, 13 insertions, 13 deletions
diff --git a/server/Cargo.toml b/server/Cargo.toml
index ed60d72..b73841e 100644
--- a/server/Cargo.toml
+++ b/server/Cargo.toml
@@ -7,22 +7,22 @@ edition = "2021"
jellycommon = { path = "../common" }
jellyremuxer = { path = "../remuxer" }
-serde = { version = "1.0.152", features = ["derive"] }
-serde_json = "1.0.91"
+serde = { version = "1.0.163", features = ["derive"] }
+serde_json = "1.0.96"
-log = "0.4.17"
+log = "0.4.18"
env_logger = "0.10.0"
-anyhow = "1.0.68"
-once_cell = "1.17.0"
+anyhow = "1.0.71"
+once_cell = "1.17.2"
chashmap = "2.2.2"
-argon2 = "0.4.1"
+argon2 = "0.5.0"
rand = "0.8.5"
-chrono = { version = "0.4.23", features = ["serde"] }
+chrono = { version = "0.4.26", features = ["serde"] }
async-std = "1.12.0"
-rocket = { version = "0.5.0-rc.2", features = ["secrets", "json"] }
-tokio = { version = "1.24.1", features = ["io-util"] }
-tokio-util = { version = "0.7.4", features = ["io", "io-util"] }
+rocket = { version = "0.5.0-rc.3", features = ["secrets", "json"] }
+tokio = { version = "1.28.2", features = ["io-util"] }
+tokio-util = { version = "0.7.8", features = ["io", "io-util"] }
markup = "0.13.1"
sled = "0.34.7"
diff --git a/server/src/routes/ui/account/mod.rs b/server/src/routes/ui/account/mod.rs
index d4afb06..b778b64 100644
--- a/server/src/routes/ui/account/mod.rs
+++ b/server/src/routes/ui/account/mod.rs
@@ -15,7 +15,7 @@ use crate::{
CONF,
};
use anyhow::anyhow;
-use argon2::{Argon2, PasswordHasher};
+use argon2::{password_hash::Salt, Argon2, PasswordHasher};
use rocket::{
form::{Contextual, Form},
get,
@@ -206,12 +206,12 @@ pub fn format_form_error<T>(form: Form<Contextual<T>>) -> MyError {
}
MyError(anyhow!(k))
}
-
+
pub fn hash_password(username: &str, password: &str) -> Vec<u8> {
Argon2::default()
.hash_password(
format!("{username}\0{password}").as_bytes(),
- r"IYMa13osbNeLJKnQ1T8LlA",
+ <&str as TryInto<Salt>>::try_into("IYMa13osbNeLJKnQ1T8LlA").unwrap(),
)
.unwrap()
.hash