Fix issue when saving session has an error (#4053)
* Fix issue is saving session has an error * Fixing break break
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
3ecbfd9716
Коммит
fc5df5c435
@@ -487,6 +487,9 @@ func login(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
c.LogAuditWithUserId(user.Id, "success")
|
c.LogAuditWithUserId(user.Id, "success")
|
||||||
|
|
||||||
doLogin(c, w, r, user, deviceId)
|
doLogin(c, w, r, user, deviceId)
|
||||||
|
if c.Err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
user.Sanitize(map[string]bool{})
|
user.Sanitize(map[string]bool{})
|
||||||
|
|
||||||
@@ -554,6 +557,9 @@ func LoginByOAuth(c *Context, w http.ResponseWriter, r *http.Request, service st
|
|||||||
} else {
|
} else {
|
||||||
user = result.Data.(*model.User)
|
user = result.Data.(*model.User)
|
||||||
doLogin(c, w, r, user, "")
|
doLogin(c, w, r, user, "")
|
||||||
|
if c.Err != nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return user
|
return user
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2544,6 +2550,9 @@ func completeSaml(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
doLogin(c, w, r, user, "")
|
doLogin(c, w, r, user, "")
|
||||||
|
if c.Err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if val, ok := relayProps["redirect_to"]; ok {
|
if val, ok := relayProps["redirect_to"]; ok {
|
||||||
http.Redirect(w, r, c.GetSiteURL()+val, http.StatusFound)
|
http.Redirect(w, r, c.GetSiteURL()+val, http.StatusFound)
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user