Skip to content

Remove non-constant JspBase.unsafe() calls from platform JSPs - #8393

Merged
labkey-adam merged 5 commits into
developfrom
fb_unsafe_constants
Nov 28, 2026
Merged

labkey-adam merged 5 commits into
developfrom
fb_unsafe_constants

Conversation

@labkey-adam

@labkey-adam labkey-adam commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Rationale

This PR removes the remaining non-constant JspBase.unsafe() calls in platform, the follow-up to #8370, so builds with -PerrorProne report no CompileTimeConstant warnings from JSPs. Along the way it fixes several places where unencoded values reached the page, including group names rendered as HTML in membership tooltips and a request-supplied participant view script.

Related Pull Requests

Changes

  • JSPs encode dynamic values with h(), write static markup directly, or use q() in script blocks instead of passing built strings to unsafe()
  • Renderers that built HTML strings (custom properties, issue detail info, pipeline delete confirmation, search indexer stats) now return HtmlString
  • Visit.SequenceHandling is safe to render directly
  • The plain-text file digest email is built in Java instead of a JSP
  • Membership tooltips encode their HTML for the attribute, and the participant view preview uses only the saved script
  • Fixed double-encoded labels on the dataset display order page and a malformed row tag in issue details

Verified with a -PerrorProne compile of all platform modules and JSPs.

Encode dynamic values or move trusted HTML into HtmlString-returning Java so every JSP unsafe() argument is a compile-time constant.
@labkey-adam labkey-adam self-assigned this Nov 28, 2026
@labkey-adam labkey-adam added this to the 26.12 milestone Nov 28, 2026
@labkey-adam
labkey-adam merged commit 76b3aad into develop Nov 28, 2026
11 checks passed
@labkey-adam
labkey-adam deleted the fb_unsafe_constants branch November 28, 2026 19:43
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