Terminate pointer-only descriptor traversal
This commit is contained in:
@@ -168,8 +168,10 @@ func schemaSecretRoot(schema *schemaDescriptor, path Path) (Path, bool) {
|
||||
walked := Path{}
|
||||
for _, segment := range path.segments {
|
||||
walked.segments = append(walked.segments, segment)
|
||||
for current.kind == descriptorPointer {
|
||||
current = current.element
|
||||
var ok bool
|
||||
current, ok = terminalDescriptor(current)
|
||||
if !ok {
|
||||
return Path{}, false
|
||||
}
|
||||
switch current.kind {
|
||||
case descriptorStruct:
|
||||
|
||||
Reference in New Issue
Block a user