Merge pull request #39 from actions/ajaykn/fix-codescan-xss

Fixing cross site scripting codescan alert
This commit is contained in:
Ajay
2022-05-24 15:02:12 +09:00
committed by GitHub

View File

@@ -159,7 +159,7 @@ func main() {
if repoName != existingRepo {
w.WriteHeader(http.StatusNotFound)
_, err := w.Write([]byte(fmt.Sprintf("Repo %s not found", repoName)))
_, err := w.Write([]byte(fmt.Sprintf("Repo %s not found", html.EscapeString(repoName))))
if err != nil {
panic(err)
}