Skip to content

Commit 4570d07

Browse files
Fix race condition with encryption upgrade/migration (#7161)
1 parent 4262c5a commit 4570d07

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api/src/org/labkey/api/security/Encryption.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,10 @@ else if (!cipher.equals(AESConfig.current.getCipherName()))
572572

573573
if (migrationNeeded)
574574
{
575+
// Reset to zero to ignore problems that might have been encountered early in startup, prior to
576+
// starting the migration process
577+
DECRYPTION_EXCEPTIONS.set(0);
578+
575579
final AESConfig migrationConfig = oldConfig;
576580
final String message = keySource;
577581
final String passPhrase = oldPassPhrase != null ? oldPassPhrase : getEncryptionPassPhrase();

0 commit comments

Comments
 (0)