Skip to content

[5.19.x] Backport: Improve FactoryFinder Validation (#1793)#1800

Merged
jbonofre merged 1 commit intoapache:activemq-5.19.xfrom
jbonofre:backport-1793-activemq-5.19.x
Mar 18, 2026
Merged

[5.19.x] Backport: Improve FactoryFinder Validation (#1793)#1800
jbonofre merged 1 commit intoapache:activemq-5.19.xfrom
jbonofre:backport-1793-activemq-5.19.x

Conversation

@jbonofre
Copy link
Member

Summary

  • Backport of Improve FactoryFinder Validation #1793 to activemq-5.19.x branch
  • Improves FactoryFinder validation with better input checking
  • Modernizes code with generics and adds improved testing

Test plan

  • Verify existing tests pass
  • Review new FactoryFinderTest, ProtocolConverterTest, and QueueBrowseServletTest

Also modernizes with generics and adds improved testing
@jbonofre jbonofre requested review from cshannon March 18, 2026 16:04
@jbonofre jbonofre changed the title Backport: Improve FactoryFinder Validation (#1793) [5.19.x] Backport: Improve FactoryFinder Validation (#1793) Mar 18, 2026

// Validate the resolved path is still within the original defined
// root path and throw an error of it is not.
if (!resolvedPath.startsWith(path)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If path is /dir1/dir2, this would match /dir1/dir2a, right? Maybe adding a trailing slash to path?

@jbonofre jbonofre merged commit 171fdfc into apache:activemq-5.19.x Mar 18, 2026
@jbonofre jbonofre deleted the backport-1793-activemq-5.19.x branch March 18, 2026 21:46
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