Skip to content

Commit

Permalink
Protect against invalid route captures (#3476)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael authored Feb 18, 2024
1 parent bc0dde3 commit f84bac4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions expr/http_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ func (e *HTTPEndpointExpr) PathParams() *MappedAttributeExpr {
for _, r := range e.Routes {
for _, p := range r.Params() {
att := pat.Find(p)
if att == nil {
continue
}
obj.Set(p, att)
if e.Params.IsRequired(p) {
v.AddRequired(p)
Expand Down

0 comments on commit f84bac4

Please sign in to comment.