mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-09-13 13:51:53 +00:00
Validate repo_id when validate token from cache for go (#521)
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user