forked from tangled.org/core
Monorepo for Tangled — https://tangled.org

urlencode email verification url's query params

when trying to verify a [plus addressed](https://www.google.com/search?q=plus+addressing) email id, opening the received verification link gives "Invalid verification code. Please request a new verification email."
this is due to unescaped `+` in the email id. ideally all the query params should be url encoded.

Tangled 710e2e63 91edc6ef

Changed files
+2 -1
appview
state
+2 -1
appview/state/settings.go
··· 6 6 "fmt" 7 7 "log" 8 8 "net/http" 9 + "net/url" 9 10 "strings" 10 11 "time" 11 12 ··· 177 178 appUrl = "https://tangled.sh" 178 179 } 179 180 180 - return fmt.Sprintf("%s/settings/emails/verify?did=%s&email=%s&code=%s", appUrl, did, email, code) 181 + return fmt.Sprintf("%s/settings/emails/verify?did=%s&email=%s&code=%s", appUrl, url.QueryEscape(did), url.QueryEscape(email), url.QueryEscape(code)) 181 182 } 182 183 183 184 func (s *State) SettingsEmailsVerify(w http.ResponseWriter, r *http.Request) {