File tree Expand file tree Collapse file tree
api/src/org/labkey/api/security Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -570,7 +570,10 @@ static void registerHandler(EncryptionMigrationHandler handler)
570570 */
571571 public static void prepareMigrationFallback ()
572572 {
573- if (!isEncryptionPassPhraseSpecified ())
573+ // Skip if no pass phrase is configured (nothing to fall back to) or we're not inserting data such
574+ // as during database migration (checkMigration() is gated the same way, so the fallback would be unused).
575+ // The latter avoids constructing an AES instance, which would lazily create a salt row in the property store.
576+ if (!isEncryptionPassPhraseSpecified () || !ModuleLoader .getInstance ().shouldInsertData ())
574577 return ;
575578
576579 String oldPassPhrase = getOldEncryptionPassPhrase ();
Original file line number Diff line number Diff line change @@ -104,11 +104,6 @@ public void beforeVerification()
104104 {
105105 super .beforeVerification ();
106106
107- // Clear prop.Properties and prop.PropertySets first: bootstrap (e.g., Encryption.checkMigration) can leave
108- // PropertySets rows whose ObjectId references the bootstrap containers, blocking the Containers delete below.
109- Table .delete (PropertySchema .getInstance ().getTableInfoProperties ());
110- Table .delete (PropertySchema .getInstance ().getTableInfoPropertySets ());
111-
112107 // Delete root and shared containers that were needed for bootstrapping
113108 Table .delete (CoreSchema .getInstance ().getTableInfoContainers ());
114109 DbScope targetScope = DbScope .getLabKeyScope ();
You can’t perform that action at this time.
0 commit comments