mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-09-01 15:36:37 +00:00
Fix skip cache error
This commit is contained in:
@@ -1283,6 +1283,7 @@ func validateToken(r *http.Request, repoID string, skipCache bool) (string, *app
|
||||
}
|
||||
}
|
||||
|
||||
if !skipCache {
|
||||
if value, ok := tokenCache.Load(token); ok {
|
||||
if info, ok := value.(*tokenInfo); ok {
|
||||
if info.repoID != repoID {
|
||||
@@ -1292,6 +1293,7 @@ func validateToken(r *http.Request, repoID string, skipCache bool) (string, *app
|
||||
return info.email, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
email, err := repomgr.GetEmailByToken(repoID, token)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user