Skip to content

Commit

Permalink
Minor adjustment to new params
Browse files Browse the repository at this point in the history
  • Loading branch information
iann0036 committed Mar 27, 2021
1 parent 5a892e2 commit ed33a7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,12 +500,12 @@ func handleAWSRequest(req *http.Request, body []byte, respCode int) {
RequiredParamLoop:
for _, requiredParam := range actionCandidate.Operation.Input.Required { // check input requirements
for k := range actionCandidate.Params {
if k == requiredParam || k[:len(requiredParam)+2] == requiredParam+"[]" || k[:len(requiredParam)+1] == requiredParam+"." { // equals, or is array, or is map
if k == requiredParam || (len(k) >= len(requiredParam)+2 && k[:len(requiredParam)+2] == requiredParam+"[]") || (len(k) >= len(requiredParam)+1 && k[:len(requiredParam)+1] == requiredParam+".") { // equals, or is array, or is map
continue RequiredParamLoop
}
}
for k := range actionCandidate.URIParams {
if k == requiredParam || k[:len(requiredParam)+2] == requiredParam+"[]" || k[:len(requiredParam)+1] == requiredParam+"." { // equals, or is array, or is map
if k == requiredParam || (len(k) >= len(requiredParam)+2 && k[:len(requiredParam)+2] == requiredParam+"[]") || (len(k) >= len(requiredParam)+1 && k[:len(requiredParam)+1] == requiredParam+".") { // equals, or is array, or is map
continue RequiredParamLoop
}
}
Expand Down

0 comments on commit ed33a7b

Please sign in to comment.