1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-13 22:01:37 +00:00

Validate repo_id when validate token from cache for go (#521)

This commit is contained in:
feiniks
2021-12-01 16:03:17 +08:00
committed by GitHub
parent 73746bdb6b
commit 273e44c18e

View File

@@ -1034,7 +1034,7 @@ func validateToken(r *http.Request, repoID string, skipCache bool) (string, *app
}
if value, ok := tokenCache.Load(token); ok {
if info, ok := value.(*tokenInfo); ok {
if info, ok := value.(*tokenInfo); ok && info.repoID == repoID {
return info.email, nil
}
}