[Security] Close cross scripting vulnerability (#21342)

* close vulnerability

* add changelog
This commit is contained in:
sarahalsmiller 2024-06-17 12:54:37 -05:00 committed by GitHub
parent 7a19d2e7a4
commit c18c911ac8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

3
.changelog/21342.txt Normal file
View File

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

View File

@ -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