fix(nifi): use equals for JNDI scheme allowlist not contains - #11592
fix(nifi): use equals for JNDI scheme allowlist not contains#11592shoemoney wants to merge 1 commit into
Conversation
Fix verified RED->GREEN. JNDI Provider URL allowlist bypass via substring check contains vs equals at 195 - s:// passes via ssl.contains("s")
exceptionfactory
left a comment
There was a problem hiding this comment.
Please review the pull request and template and verify that the pull request meets initial criteria for review and inclusion, including an associate Jira issue and signed commits. Feel free to open a new pull request after completing the required steps
|
Thanks @exceptionfactory for the review. Acknowledged that this PR is closed and did not meet the NiFi contribution requirements. Missing items per the PR template:
The fix itself (equalsIgnoreCase instead of contains for scheme allowlist, 1 line) is verified and existing tests pass. Plan is to create a Jira, rebase to a single signed commit with the NIFI prefix, and open a new PR that follows the template. No action needed on this closed PR. Appreciate the guidance. |
JNDI Provider URL allowlist bypass via substring check.
Bug: JndiJmsConnectionFactoryProperties.isSchemeAllowed uses allowedScheme.contains(scheme). Any substring of an allowed scheme passes, for example s:// passes because ssl.contains(s) is true, and fi:// passes via file.contains(fi).
Fix: Replace contains with equalsIgnoreCase for exact case-insensitive match. One line change at line 195.
Evidence: