fix: reflected XSS vulnerability plist api

pull/5581/head
Andy Hsu 2023-11-24 16:46:48 +08:00
parent 34746e951c
commit 6100647310
1 changed files with 2 additions and 0 deletions

View File

@ -45,6 +45,8 @@ func Plist(c *gin.Context) {
} }
fullName := c.Param("name") fullName := c.Param("name")
Url := link.String() Url := link.String()
Url = strings.ReplaceAll(Url, "<", "[")
Url = strings.ReplaceAll(Url, ">", "]")
nameEncode := linkNameSplit[1] nameEncode := linkNameSplit[1]
fullName, err = url.PathUnescape(nameEncode) fullName, err = url.PathUnescape(nameEncode)
if err != nil { if err != nil {