Skip to content

Commit

Permalink
[CLOUDTRUST-2072] Check that correlationId input is valid - context fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fperot74 authored Jan 14, 2020
1 parent 3626264 commit ae95783
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/correlation.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func MakeHTTPCorrelationIDMW(idGenerator gen.IDGenerator, tracer tracing.Opentra
if correlationID == "" {
correlationID = idGenerator.NextID()
} else if match, _ := regexp.MatchString(regExpCorrelationID, correlationID); !match {
httpErrorHandler(context.Background(), http.StatusBadRequest, errorhandler.CreateInvalidQueryParameterError("X-Correlation-ID"), w)
httpErrorHandler(req.Context(), http.StatusBadRequest, errorhandler.CreateInvalidQueryParameterError("X-Correlation-ID"), w)
return
}

Expand Down

0 comments on commit ae95783

Please sign in to comment.