mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-09-16 07:10:07 +00:00
Validate repo_id when validate token from cache (#520)
This commit is contained in:
@@ -303,7 +303,7 @@ validate_token (HttpServer *htp_server, evhtp_request_t *req,
|
||||
pthread_mutex_lock (&htp_server->token_cache_lock);
|
||||
|
||||
token_info = g_hash_table_lookup (htp_server->token_cache, token);
|
||||
if (token_info) {
|
||||
if (token_info && strcmp (token_info->repo_id, repo_id) == 0) {
|
||||
if (username)
|
||||
*username = g_strdup(token_info->email);
|
||||
pthread_mutex_unlock (&htp_server->token_cache_lock);
|
||||
|
Reference in New Issue
Block a user