修复安全漏洞

This commit is contained in:
dushixiang
2021-03-11 12:19:36 +08:00
parent e5f5b2b7de
commit ba5bff1b38
3 changed files with 32 additions and 2 deletions

View File

@ -177,7 +177,10 @@ func LogoutEndpoint(c echo.Context) error {
token := GetToken(c)
cacheKey := BuildCacheKeyByToken(token)
global.Cache.Delete(cacheKey)
model.Logout(token)
err := model.Logout(token)
if err != nil {
return err
}
return Success(c, nil)
}