mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-06 09:22:42 +08:00
remove query unescape usage
This commit is contained in:
@@ -2,7 +2,6 @@ package controller
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
@@ -92,7 +91,7 @@ func userMiddleWare(handler http.Handler) http.Handler {
|
||||
if userID, ok := params["username"]; ok {
|
||||
r.Header.Set("TARGET_RSRC_ID", userID)
|
||||
} else {
|
||||
username, _ := url.QueryUnescape(r.URL.Query().Get("username"))
|
||||
username := r.URL.Query().Get("username")
|
||||
if username != "" {
|
||||
r.Header.Set("TARGET_RSRC_ID", username)
|
||||
}
|
||||
|
Reference in New Issue
Block a user