Skip to content

Commit

Permalink
Add typed nil validation to dsl.Security
Browse files Browse the repository at this point in the history
  • Loading branch information
tchssk committed Aug 9, 2024
1 parent 743cb5a commit 05af8b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dsl/security.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ func Security(args ...any) {
return
}
case *expr.SchemeExpr:
if val == nil {
eval.InvalidArgError("security scheme", val)
return
}
schemes[i] = expr.DupScheme(val)
default:
eval.InvalidArgError("security scheme or security scheme name", val)
Expand Down

0 comments on commit 05af8b8

Please sign in to comment.