mirror of
https://github.com/hrfee/jfa-go.git
synced 2026-01-18 16:47:42 +01:00
query unescape more routes
fixes #447. Went through all routes with components in the path to check if they needed escaping, quite a few did.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -584,8 +585,9 @@ func (app *appContext) MatrixConnect(gc *gin.Context) {
|
||||
// @Security Bearer
|
||||
// @tags Other
|
||||
func (app *appContext) DiscordGetUsers(gc *gin.Context) {
|
||||
name := gc.Param("username")
|
||||
if name == "" {
|
||||
escapedName := gc.Param("username")
|
||||
name, err := url.QueryUnescape(escapedName)
|
||||
if err != nil || name == "" {
|
||||
respondBool(400, false, gc)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user