feat: probably fix it

Signed-off-by: izzy <me@insrt.uk>
This commit is contained in:
izzy
2026-02-10 20:22:48 +00:00
parent d54632422e
commit 82391f8a24
6 changed files with 33 additions and 24 deletions
Generated
+2 -2
View File
@@ -248,7 +248,7 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
[[package]]
name = "authifier"
version = "1.0.15"
version = "1.0.16"
dependencies = [
"async-std",
"async-trait",
@@ -2403,7 +2403,7 @@ dependencies = [
[[package]]
name = "rocket_authifier"
version = "1.0.15"
version = "1.0.16"
dependencies = [
"async-std",
"authifier",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "authifier"
version = "1.0.15"
version = "1.0.16"
edition = "2021"
license = "Apache-2.0"
authors = ["Pawel Makles <me@insrt.uk>"]
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "rocket_authifier"
version = "1.0.15"
version = "1.0.16"
edition = "2021"
license = "Apache-2.0"
authors = ["Pawel Makles <me@insrt.uk>"]
@@ -1,5 +1,6 @@
//! Send a password reset email
//! POST /account/reset_password
use authifier::models::EmailVerification;
use authifier::util::normalise_email;
use authifier::{Authifier, Result};
use rocket::serde::json::Json;
@@ -47,8 +48,10 @@ pub async fn send_password_reset(
.find_account_by_normalised_email(&email_normalised)
.await?
{
if !matches!(account.verification, EmailVerification::Pending { .. }) {
account.start_password_reset(authifier, false).await?;
}
}
// Never fail this route, (except for db error)
// You may open the application to email enumeration otherwise.
+22 -19
View File
@@ -1,23 +1,26 @@
{ pkgs ? import (fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/77ef7a29d276c6d8303aece3444d61118ef71ac2.tar.gz";
sha256 = "0pm4l48jq8plzrrrisimahxqlcpx7qqq9c99hylmf7p3zlc3phsy";
}) {},
}:
let
# Pinned nixpkgs, deterministic. Last updated: 11-08-2023.
pkgs = import (fetchTarball("https://github.com/NixOS/nixpkgs/archive/bb9707ef2ea4a5b749b362d5cf81ada3ded2c53f.tar.gz")) {};
# Rolling updates, not deterministic.
# pkgs = import (fetchTarball("channel:nixpkgs-unstable")) {};
in pkgs.mkShell {
name = "authifierEnv";
buildInputs = [
# Tools
pkgs.git
# Rust
pkgs.cargo
pkgs.rustc
pkgs.clippy
pkgs.pkgconfig
pkgs.openssl.dev
nix-ld-libs = pkgs.buildEnv {
name = "nix-ld-libs";
paths = with pkgs; [
stdenv.cc.cc.lib
zlib
openssl
];
};
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
in pkgs.mkShell {
packages = with pkgs; [
mise
pkg-config
openssl.dev
(writeShellScriptBin "fish" ''
exec ${pkgs.fish}/bin/fish -C 'mise activate fish | source' "$@"
'')
];
}
+3
View File
@@ -0,0 +1,3 @@
[tools]
gh = "2.25.0"
rust = "1.92.0"