Skip to content

Commit

Permalink
Ensure substitution map has been initialized before testing
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-adam committed Feb 28, 2025
1 parent a6280c5 commit 0742bef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/src/org/labkey/filters/ContentSecurityPolicyFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ public void testSubstitutionMap()
{
synchronized (ALLOWED_SOURCES_LOCK)
{
// Ensure substitution map has been initialized, otherwise the finally block asserts will fail
regenerateSubstitutionMap();
// Make a deep copy of ALLOWED_SOURCES so we can restore it after testing
int sourceMapSize = ALLOWED_SOURCES.size();
int substitutionMapSize = ALLOWED_SOURCES_SUBSTITUTION_MAP.size();
Expand Down

0 comments on commit 0742bef

Please sign in to comment.