Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [Security Issue] you are leaking the OAuth2 client_secret #52

Open
ppetermann opened this issue Feb 16, 2019 · 3 comments
Open

[BUG] [Security Issue] you are leaking the OAuth2 client_secret #52

ppetermann opened this issue Feb 16, 2019 · 3 comments

Comments

@ppetermann
Copy link

ppetermann commented Feb 16, 2019

In:

'clientSecret' => $providerConfig->getClientSecret(),

the client_secret is put into the ProviderOptions, which is used here:

$providerOptions = $this->providerManager->getProviderOptions($providerName);

$options = array_merge($providerOptions, ['approval_prompt' => $approvalPrompt]);

$authorizationUrl = $provider->getAuthorizationUrl($options);

to build the authorization Url, which ist send as a redirect to the users browser, thus exposing the client_secret.

the client_secret should only be used in the token exchange, thus when the server makes the request to the provider, and not during authorization when the browser of the user does.

This is NOT a flaw in Leagues client, this is due to too many options being included when forming the url in the aforementioned lines of code.

@SvanteRichter
Copy link
Collaborator

Hey,

Thanks for the report and digging into this. Also sorry for it being 3 days before I saw this, I'm looking for other maintainers for this repo. Do you have a fix for this ready? If so I'd be more than willing to merge it and tag a release ASAP. Otherwise I'll try to get time to fix this as soon as I can find time.

Thanks!

@rossriley
Copy link
Contributor

@SahAssar I'll have a look at it if you've not had time yet.

@SvanteRichter
Copy link
Collaborator

@rossriley Thanks, that'd be great :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants