fix(apps::protocols::http): handle nested JSON path in collection mode#6038
Merged
fix(apps::protocols::http): handle nested JSON path in collection mode#6038
Conversation
|
Fixed Issues (951)Great job! The following issues were fixed in this Pull Request
|
…n collection mode Add Robot Framework tests demonstrating that parse_structure fails to traverse JSON paths deeper than 2 levels. The regex at line 477 of collection.pm only splits on the first dot, treating the remainder as a literal key instead of recursively traversing the hash. Test uses a Mockoon mock returning nested JSON (up to 4 levels) and a collection config that parses paths like location.rack.row and location.rack.position.slot. These tests will fail until the fix is applied. CTOR-865
Replace the single-dot regex split with a loop that walks each segment
of the dotted path. The old code split on the first dot only, so paths
like location.rack.row resolved to $value->{location}->{'rack.row'}
which is undefined. The new code splits on all dots and traverses each
key in turn, supporting arbitrary depth.
CTOR-865
6ad8630 to
cc9eed5
Compare
Contributor
|
This PR should fix #5118 |
omercier
approved these changes
Mar 26, 2026
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.


Description
Fixes: CTOR-865
Add Robot Framework tests demonstrating that
parse_structurein HTTP collection mode fails to traverse JSON paths deeper than 2 levels. The regex^(.+?)\.(.*)$at line 477 ofcollection.pmonly splits on the first dot, treating the remainder as a literal key instead of recursively traversing the hash.The test uses:
These tests will fail until the fix for deep path traversal is applied, then pass after.
Type of change
Target serie
Summary by Aikido
⚡ Enhancements
🐛 Bugfixes
📚 Documentation
More info