Skip to content

Commit

Permalink
fix: check len(parts) !=3
Browse files Browse the repository at this point in the history
Signed-off-by: Oreon Lothamer <[email protected]>
  • Loading branch information
Oreon Lothamer authored and oreonl committed Sep 7, 2023
1 parent 0795e33 commit 1075c43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/argo/resource_tracking.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (rt *resourceTracking) ParseAppInstanceValue(value string) (*AppInstanceVal
var appInstanceValue AppInstanceValue
parts := strings.SplitN(value, ":", 3)
appInstanceValue.ApplicationName = parts[0]
if len(parts) < 2 {
if len(parts) != 3 {
return nil, WrongResourceTrackingFormat
}
groupParts := strings.Split(parts[1], "/")
Expand Down

0 comments on commit 1075c43

Please sign in to comment.