Browse Source

[Security] Close cross scripting vulnerability (#21342)

* close vulnerability

* add changelog
pull/21347/head
sarahalsmiller 5 months ago committed by GitHub
parent
commit
c18c911ac8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      .changelog/21342.txt
  2. 2
      agent/kvs_endpoint.go

3
.changelog/21342.txt

@ -0,0 +1,3 @@
```release-note:security
agent: removed reflected cross-site scripting vulnerability
```

2
agent/kvs_endpoint.go

@ -293,7 +293,7 @@ func conflictingFlags(resp http.ResponseWriter, req *http.Request, flags ...stri
if _, ok := params[conflict]; ok {
if found {
resp.WriteHeader(http.StatusBadRequest)
fmt.Fprint(resp, "Conflicting flags: "+params.Encode())
fmt.Fprintf(resp, "Conflicting flags: %v\n", params.Encode())
return true
}
found = true

Loading…
Cancel
Save