Skip to content

Commit

Permalink
remove maxUnwrapping limit
Browse files Browse the repository at this point in the history
Signed-off-by: Eliott Bouhana <[email protected]>
  • Loading branch information
eliottness committed Nov 26, 2024
1 parent a4144b7 commit 74b225d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/appsec/dyngo/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,10 @@ func FindOperation[T any, O interface {
return nil, false
}

const maxUnwrapping = 32
for i := 0; i < maxUnwrapping && op != nil; i++ {
if o, ok := op.(O); ok {
for current := op; current != nil; current = current.unwrap().parent {
if o, ok := current.(O); ok {
return o, true
}
op = op.Parent()
}

return nil, false
Expand Down

0 comments on commit 74b225d

Please sign in to comment.