Files
nixpkgs/pkgs/servers/kanidm/a3bc718a8a0325a53e0857668b8a0134d371794d.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
1.3 KiB
Diff
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
From a3bc718a8a0325a53e0857668b8a0134d371794d Mon Sep 17 00:00:00 2001
From: Firstyear <william@blackhats.net.au>
Date: Sat, 16 Aug 2025 13:46:23 +1000
Subject: [PATCH] Fix account recover-disable edge case (#3796)
---
server/lib/src/idm/server.rs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/server/lib/src/idm/server.rs b/server/lib/src/idm/server.rs
index 0fc6d78787..51bfbf6705 100644
--- a/server/lib/src/idm/server.rs
+++ b/server/lib/src/idm/server.rs
@@ -1900,6 +1900,7 @@ impl IdmServerProxyWriteTransaction<'_> {
let modlist = ModifyList::new_list(vec![
// Ensure the account is valid from *now*, and that the expiry is unset.
m_purge(Attribute::AccountExpire),
+ m_purge(Attribute::AccountValidFrom),
Modify::Present(Attribute::AccountValidFrom, v_valid_from),
// We need to remove other credentials too.
m_purge(Attribute::PassKeys),
@@ -1934,6 +1935,7 @@ impl IdmServerProxyWriteTransaction<'_> {
let modlist = ModifyList::new_list(vec![
// Ensure that the account has no validity, and the expiry is now.
m_purge(Attribute::AccountValidFrom),
+ m_purge(Attribute::AccountExpire),
Modify::Present(Attribute::AccountExpire, v_expire),
]);