Skip to content

Commit

Permalink
Escape user input used in output (#2815)
Browse files Browse the repository at this point in the history
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
  • Loading branch information
jpkrohling authored Mar 26, 2021
1 parent acb3ae1 commit 4daf2a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion receiver/jaegerreceiver/trace_receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package jaegerreceiver
import (
"context"
"fmt"
"html"
"io/ioutil"
"mime"
"net"
Expand Down Expand Up @@ -441,7 +442,7 @@ func (jr *jReceiver) HandleThriftHTTPBatch(w http.ResponseWriter, r *http.Reques

batch, hErr := jr.decodeThriftHTTPBody(r)
if hErr != nil {
http.Error(w, hErr.msg, hErr.statusCode)
http.Error(w, html.EscapeString(hErr.msg), hErr.statusCode)
obsreport.EndTraceDataReceiveOp(ctx, thriftFormat, 0, hErr)
return
}
Expand Down

0 comments on commit 4daf2a1

Please sign in to comment.