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

Library breaks in PHP 7.1 due to deprecated mcrypt_module_open() #650

Closed
KaneCohen opened this issue Aug 21, 2017 · 2 comments
Closed

Library breaks in PHP 7.1 due to deprecated mcrypt_module_open() #650

KaneCohen opened this issue Aug 21, 2017 · 2 comments

Comments

@KaneCohen
Copy link

KaneCohen commented Aug 21, 2017

It's not issue directly in the OAuth2 Client library, however I feel like it should be noted.

During authorization flow library calls getRandomState() method which is supposed to generate some random string of a given length. Here library uses RandomLib to pick appropriate random string generator and then uses it to generate a string. Problem is - RandomLib internally uses mcrypt_module_open() function which in PHP7.1 has been deprecated.

This basically breaks OAuth2 Client authorization flow. This I'm assuming affects all other libraries that user OAuth2 Client.

RandomLib has appropriate issue submitted, but not yet resolved.

@ramsey
Copy link
Contributor

ramsey commented Aug 21, 2017

What version of league/oauth2-client are you using? Version 2 no longer uses RandomLib. Instead, it uses random_bytes() in PHP 7, falling back to paragonie/random_compat for earlier versions of PHP. I advise upgrading to the 2.x series of the oauth2-client library.

@KaneCohen
Copy link
Author

Oh I see. I'm using 1.x version of FB/Google clients.

Thanks a lot for the answer, will update libraries.

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

2 participants