Skip to content

Commit 9f98024

Browse files
committed
changed when the cached password gets removed
1 parent 907eb7c commit 9f98024

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

QuickUnlockProvider.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,6 @@ public override byte[] GetKey(KeyProviderQueryContext ctx)
106106
return null;
107107
}
108108

109-
//remove the cache entry
110-
unlockCache.Remove(ctx.DatabasePath);
111-
112109
var password = cachePassword.Password.ReadString();
113110
Func<bool> cmp;
114111
if (mode == QuickUnlockWhere.Front)
@@ -122,6 +119,9 @@ public override byte[] GetKey(KeyProviderQueryContext ctx)
122119

123120
if (!cmp())
124121
{
122+
//remove the cache entry
123+
unlockCache.Remove(ctx.DatabasePath);
124+
125125
//return dummy password to let KeePass fail while loading the database
126126
return new byte[] { 0 };
127127
}

0 commit comments

Comments
 (0)