Skip to content

Remove CSP versions from headers and URLs#7487

Open
labkey-adam wants to merge 2 commits intorelease26.3-SNAPSHOTfrom
26.3_fb_csp_version
Open

Remove CSP versions from headers and URLs#7487
labkey-adam wants to merge 2 commits intorelease26.3-SNAPSHOTfrom
26.3_fb_csp_version

Conversation

@labkey-adam
Copy link
Contributor

@labkey-adam labkey-adam commented Mar 11, 2026

Rationale

There's no need to send cspVersion to the browser and back to the server. Mirrors what we did recently for labkeyVersion.

Related Pull Requests

@labkey-adam labkey-adam added this to the 26.03 milestone Mar 13, 2026
Copy link
Contributor

@labkey-jeckels labkey-jeckels left a comment

Choose a reason for hiding this comment

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

I haven't had a chance to test this yet.

* Extract the cspVersion parameter value from a comment in the CSP, if it exists. Otherwise, cspVersion is left as
* "Unknown". This value is reported as part of usage metrics and sent in reports.
*/
private void extractCspVersion(String s)
Copy link
Contributor

Choose a reason for hiding this comment

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

Good candidate for a new, targeted unit test.

}
catch (IllegalArgumentException e)
int start = idx + CSP_VERSION.length();
int end = s.indexOf(" ", start);
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we guaranteed to always have a space afterwards? If that's the required convention, consider error logging if we don't.

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.

2 participants