Skip to content

Conversation

@labkey-adam
Copy link
Contributor

Rationale

Back port to support report-to CSP directive in 26.2

Also, limit ImpersonatingTroubleshooter permissions to the root

@labkey-adam labkey-adam changed the base branch from develop to release26.2-SNAPSHOT February 2, 2026 19:51
{
synchronized (SUBSTITUTION_LOCK)
{
_previousBaseServerUrl = baseServerUrl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fine for our purposes given how infrequently the base URL changes, but in theory another thread could come along after _previousBaseServerUrl has been updated but before the rest of the reset has happened, and end up with a mix of old and new values

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to avoid synchronizing on every request, of course. I should probably set _previousBaseServerUrl at the end of the block (or outside the block) to make this less likely. The other scenario (multiple requests seeing a stale base server URL and duplicating the work) is then more likely to happen, but this shouldn't be a problem. If I make a change, it'll be in a future develop PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another strategy would be to create a record or other immutable data structure to hold _policyTemplate and _reportingEndpointsHeaderValue. That way you could swap in new values atomically.

I don't think any of these problems is likely in the real world, so making any revisions (if at all) in develop sounds good.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that idea. We'd have to add _policyExpression into the record as well.

@labkey-adam labkey-adam merged commit 4ab0ea2 into release26.2-SNAPSHOT Feb 3, 2026
6 of 12 checks passed
@labkey-adam labkey-adam deleted the 26.2_fb_report_to branch February 3, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants