Browse Source

safe check

for-closed-social
Unknwon 10 years ago
parent
commit
b6437b5a4c
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      routers/user/social.go

+ 4
- 0
routers/user/social.go View File

@ -51,6 +51,10 @@ func SocialSignIn(ctx *middleware.Context) {
ctx.Handle(500, fmt.Sprintf("UserInfo(%s)", name), err)
return
}
if len(ui.Identity) == 0 {
ctx.Handle(404, "no identity is presented", errors.New(name))
return
}
log.Info("social.SocialSignIn(social login): %s", ui)
oa, err := models.GetOauth2(ui.Identity)

Loading…
Cancel
Save