Skip to content

Conversation

@sibuk-harabudjasim
Copy link

This fix solves problem when using "fields" query parameter and trying to fetch fields 2 levels deeper than target path.
For example in model:

module m {
	prefix "";
	namespace "";
	revision 0;
	container aaa {
		list bbb {
			leaf ccc {
				type string;
			}
		}
	}
	container ddd {
		leaf eee {
			type string;
		}
	}
}

request /restconf/data/m:aaa?fields=bbb/ccc will crash with panic "illegal call : base was not found to be any parent of candidate" because "fields" segments length is bigger than current candidate and this case was not covered in code.

@dhubler
Copy link
Collaborator

dhubler commented Jan 24, 2025

love all the commits! want to give them the time they deserve for review, but shouldn't be an issue

@sibuk-harabudjasim
Copy link
Author

No worries, I've switched to forked version for my needs.

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