do not use client credentials for /auth/github
This commit is contained in:
parent
8b72b0a1b4
commit
6b2a1a0da8
|
@ -218,7 +218,7 @@ class Travis::Api::App
|
||||||
end
|
end
|
||||||
|
|
||||||
def user_for_github_token(token, drop_token = false)
|
def user_for_github_token(token, drop_token = false)
|
||||||
data = GH.with(token: token.to_s) { GH['user'] }
|
data = GH.with(token: token.to_s, client_id: nil) { GH['user'] }
|
||||||
scopes = parse_scopes data.headers['x-oauth-scopes']
|
scopes = parse_scopes data.headers['x-oauth-scopes']
|
||||||
halt 403, 'insufficient access: %p' unless acceptable? scopes
|
halt 403, 'insufficient access: %p' unless acceptable? scopes
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user