summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2015-12-14 09:54:11 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2015-12-14 09:54:11 -0500
commitaec25ceb4b9943848bc55a5ca76b7021789e4336 (patch)
tree7f5c2c9c25349239fe1be7b7cb98ddcbb8798273 /web
parentb9a4966e7d287ddaa16ccd7d553e2ada13edc289 (diff)
parent7fb1551254cb6085f2fe227f10f510b39bcfe424 (diff)
downloadchat-aec25ceb4b9943848bc55a5ca76b7021789e4336.tar.gz
chat-aec25ceb4b9943848bc55a5ca76b7021789e4336.tar.bz2
chat-aec25ceb4b9943848bc55a5ca76b7021789e4336.zip
Merge pull request #1720 from rgarmsen2295/plt-860
PLT 860 & 1116 - Changes test emails to include a '+' and fixes email verification issue with emails that included a '+'
Diffstat (limited to 'web')
-rw-r--r--web/web.go2
-rw-r--r--web/web_test.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/web/web.go b/web/web.go
index a72bff2bf..63544229b 100644
--- a/web/web.go
+++ b/web/web.go
@@ -564,7 +564,7 @@ func verifyEmail(c *api.Context, w http.ResponseWriter, r *http.Request) {
return
} else {
c.LogAudit("Email Verified")
- http.Redirect(w, r, api.GetProtocol(r)+"://"+r.Host+"/"+name+"/login?verified=true&email="+email, http.StatusTemporaryRedirect)
+ http.Redirect(w, r, api.GetProtocol(r)+"://"+r.Host+"/"+name+"/login?verified=true&email="+url.QueryEscape(email), http.StatusTemporaryRedirect)
return
}
}
diff --git a/web/web_test.go b/web/web_test.go
index 4e15037ad..8d40810b5 100644
--- a/web/web_test.go
+++ b/web/web_test.go
@@ -60,7 +60,7 @@ func TestGetAccessToken(t *testing.T) {
team := model.Team{DisplayName: "Name", Name: "z-z-" + model.NewId() + "a", Email: "test@nowhere.com", Type: model.TEAM_OPEN}
rteam, _ := ApiClient.CreateTeam(&team)
- user := model.User{TeamId: rteam.Data.(*model.Team).Id, Email: strings.ToLower(model.NewId()) + "corey@test.com", Password: "pwd"}
+ user := model.User{TeamId: rteam.Data.(*model.Team).Id, Email: strings.ToLower(model.NewId()) + "corey+test@test.com", Password: "pwd"}
ruser := ApiClient.Must(ApiClient.CreateUser(&user, "")).Data.(*model.User)
store.Must(api.Srv.Store.User().VerifyEmail(ruser.Id))
@@ -189,7 +189,7 @@ func TestIncomingWebhook(t *testing.T) {
team := &model.Team{DisplayName: "Name", Name: "z-z-" + model.NewId() + "a", Email: "test@nowhere.com", Type: model.TEAM_OPEN}
team = ApiClient.Must(ApiClient.CreateTeam(team)).Data.(*model.Team)
- user := &model.User{TeamId: team.Id, Email: model.NewId() + "corey@test.com", Nickname: "Corey Hulen", Password: "pwd"}
+ user := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"}
user = ApiClient.Must(ApiClient.CreateUser(user, "")).Data.(*model.User)
store.Must(api.Srv.Store.User().VerifyEmail(user.Id))