[bot] Merge 25.7 to 25.11 (Conflicts)#293
Merged
github-actions[bot] merged 5 commits intoJun 26, 2026
Merged
Conversation
## Rationale `GetImportMethodsAction` and four sibling actions in `LaboratoryController` looked up assay protocols by row id via `ExperimentService.getExpProtocol(int)`, an unscoped global primary-key lookup. Because these actions are guarded only by container-level permissions, a user with read access to any single folder could supply an arbitrary protocol row id and have the server operate on a protocol defined in a folder they cannot read. `GetImportMethodsAction` additionally echoed the protocol's name, container, and container path back in its response, allowing cross-container enumeration of assay design names and folder paths (an IDOR / information-disclosure issue). The unchecked lookup in `GetImportMethodsAction` could also NPE on a non-existent row id. ## Related Pull Requests None. ## Changes - Each protocol lookup now verifies the protocol is in scope for the request container via `AssayService.getAssayProtocols(getContainer())` before use, covering `GetImportMethodsAction`, `ProcessAssayDataAction`, `SaveTemplateAction`, `CreateTemplateAction`, and `GetAssayImportHeadersAction`. - The scope check is folded into each existing null guard, returning the same generic not-found message whether the row id is unknown or simply out of scope, so the response is not an existence oracle. - Legitimate same-container callers (e.g. `Laboratory.Utils.getAssayDetails` from the assay import/template panels) are unaffected, since they always pass an in-scope protocol.
## Rationale Two spots in LDKController rendered untrusted content as raw HTML. The container-scoped-table inspection view is a correction to a previous security fix (#268): the HTMLView cleanup there wrapped the whole string in HtmlString.of, which escaped the literal <br>/<p> markup too — safe, but it broke the intended formatting. This escapes only the dynamic validation messages (which can contain arbitrary content from direct DB inserts that bypass the user schema) while preserving the markup. The invalid-redirect error message separately echoed the user-supplied URL via HtmlString.unsafe, so it is now escaped. ## Related Pull Requests - #268 ## Changes - Container-scoped-table inspection view: escape each validation message with PageFlowUtil.filter before joining with <br>, then wrap the assembled markup in HtmlString.unsafe — fixing the over-escaping introduced by #268 while keeping the output safe. - Invalid-redirect error message: switch the user-supplied URL from HtmlString.unsafe to HtmlString.of so it is escaped.
#### Rationale Using StringBuilder to manually build up HTML is error prone and unsafe. Updating usages to use the java DOM API so all HTML is properly escaped and potential XSS issues are mitigated. #### Related Pull Requests * <!-- list of links to related pull requests (replace this comment) --> #### Changes * LaboratoryController: Use java DOM API instead of StringBuilder
Conflicts: laboratory/src/org/labkey/laboratory/LaboratoryController.java
3f75aa3 to
47ca924
Compare
labkey-tchad
approved these changes
Jun 26, 2026
47ca924
into
release25.11-SNAPSHOT
8 of 10 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automatic merge failed! Please merge
25.7into25.11_fb_bot_merge_25.7and resolve conflicts manually.Resolve all conflicts (using IntelliJ or
git mergetool)Approve all matching PRs simultaneously.
Approval will trigger automatic merge.
Verify all PRs before approving: https://internal.labkey.com/Scrumtime/Backlog/harvest-gitOpenPullRequests.view?branch=25.11_fb_bot_merge_25.7