X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/053f74285455278bed87cd4b3dc0df2adffb3b9c..629cd91ffca67d6de5ad4dbe9854a064f9e26820:/services/api/app/models/api_client_authorization.rb diff --git a/services/api/app/models/api_client_authorization.rb b/services/api/app/models/api_client_authorization.rb index a6beaa07ab..f8454029d6 100644 --- a/services/api/app/models/api_client_authorization.rb +++ b/services/api/app/models/api_client_authorization.rb @@ -115,8 +115,9 @@ class ApiClientAuthorization < ArvadosModel case token[0..2] when 'v2/' _, token_uuid, secret, optional = token.split('/') - unless token_uuid.andand.length == 27 && secret.andand.length.andand > 0 - # invalid token + unless token_uuid.andand.length == 27 && secret.andand.length.andand > 0 && + token_uuid == Rails.configuration.ClusterID+"-gj3su-anonymouspublic" + # invalid v2 token, or v2 token for another user return nil end else