Skip to content

Commit

Permalink
Fix security issue
Browse files Browse the repository at this point in the history
  • Loading branch information
airenas committed Feb 19, 2021
1 parent 2d085bc commit 5bcf866
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/pkg/admin/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package admin

import (
"encoding/json"
"html"
"log"
"net/http"
"strconv"
Expand Down Expand Up @@ -283,7 +284,7 @@ func validateProject(project string, prV PrValidator, w http.ResponseWriter) boo
return false
}
if !prV.Check(project) {
http.Error(w, "Wrong project "+project, http.StatusBadRequest)
http.Error(w, "Wrong project "+html.EscapeString(project), http.StatusBadRequest)
goapp.Log.Errorf("Wrong project %s", project)
return false
}
Expand Down

0 comments on commit 5bcf866

Please sign in to comment.