Skip to content

Commit

Permalink
RHINENG-12951: fix CWE-918
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMraka committed Oct 4, 2024
1 parent 4698cdd commit 5328986
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion turnpike/controllers/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"fmt"
"io"
"net/http"
"net/url"
"regexp"
"strconv"
"time"
Expand Down Expand Up @@ -293,7 +294,7 @@ func GetManagerPprof(c *gin.Context) {
func pprofHandler(c *gin.Context, address string) {
query := c.Request.URL.RawQuery
param := c.Param("param")
data, err := getPprof(address, param, query)
data, err := getPprof(address, url.QueryEscape(param), query)
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"err": err.Error()})
return
Expand Down

0 comments on commit 5328986

Please sign in to comment.