Fix base64 encoded prefix received on the server side for chinese characters (#1126)

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
Daniel Valdivia
2021-10-19 13:00:13 -07:00
committed by GitHub
parent c62fecbac1
commit ba9f4d094b
3 changed files with 15 additions and 10 deletions

View File

@@ -136,3 +136,8 @@ func ExpireSessionCookie() http.Cookie {
SameSite: http.SameSiteLaxMode,
}
}
// SanitizeEncodedPrefix replaces spaces for + since those are lost when you do GET parameters
func SanitizeEncodedPrefix(rawPrefix string) string {
return strings.Replace(rawPrefix, " ", "+", -1)
}