Skip to content

Commit

Permalink
Ignore expired entries when loading from group context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
bonki authored and dlech committed Dec 24, 2023
1 parent 025f0cf commit c4d79c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions KeeAgent/KeeAgentExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -525,12 +525,16 @@ private void GroupContextMenuLoadKeysMenuItem_Click(object sender, EventArgs e)
}
var recycleBin = activeDatabase.RootGroup.FindGroup(activeDatabase.RecycleBinUuid, true);
var selectedGroup = pluginHost.MainWindow.GetSelectedGroup();
var dtNow = DateTime.UtcNow;
foreach (var entry in selectedGroup.GetEntries(true)) {
if (activeDatabase.RecycleBinEnabled) {
if (entry.IsContainedIn(recycleBin)) {
continue;
}
}
if (entry.Expires && entry.ExpiryTime <= dtNow) {
continue;
}
var settings = entry.GetKeeAgentSettings();
if (settings.AllowUseOfSshKey) {
AddEntry(entry, null);
Expand Down

0 comments on commit c4d79c1

Please sign in to comment.