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

PHP: each() is deprecated #20

Open
My1 opened this issue Jan 14, 2019 · 5 comments
Open

PHP: each() is deprecated #20

My1 opened this issue Jan 14, 2019 · 5 comments

Comments

@My1
Copy link

My1 commented Jan 14, 2019

The Yubico Plugin spawns a little PHP warning if using PHP >= 7.2 (which basically means any version that is currently fully supported, as PHP 7.1 is down to security only.

The each() function is deprecated. This message will be suppressed on further calls at apps/twofactor_yubikey/vendor/auth_yubico/Yubico.php#395

@jaark
Copy link
Owner

jaark commented Jan 14, 2019

This is an issue with the Yubico library.
There is a fix in the gifu development version but not in the current release version.
I will look at migrating to the development version. Hopefully the api remains the dame.

@My1
Copy link
Author

My1 commented Jan 15, 2019

I have always used https://github.com/multiOTP/yubicloud-class-php for my yubicloud business, also because it diesnt depend on anything, the business seems the same as described.

  • include/require the file
  • create a new instance
  • feed it your api data
  • feed it your OTPs and take the response

just the reply handling seems a bit different. 'OK' means valid the rest is an error

jaark added a commit that referenced this issue Apr 14, 2019
Behaviour change - Authentication server is now a full URL.
@jaark
Copy link
Owner

jaark commented Apr 14, 2019

Upgraded the Yubico library.

Ther are a couple of minor usage changes, the useSSL flag now has no function and the authentication server needs to be specified as a full URL (instead of just host/path previously)

@jaark
Copy link
Owner

jaark commented Apr 16, 2019

I think this is working. I had a few issues originally but that could have been my Internet connection as it seems solid now with no changes to the server interaction layer.

@Mak36
Copy link

Mak36 commented Apr 24, 2019

Hello, I have the same problem. If I activate the app and enter API information, the registration will work properly. However, as soon as a user wants to remove the key, the following error message appears:

Undefined property: OCA\TwoFactor_Yubikey\Service\Yubiotp::$provider at /var/www/nextcloud/apps/twofactor_yubikey/lib/Service/Yubiotp.php#182

and

TypeError: Argument 1 passed to OC\Authentication\TwoFactorAuth\Registry::disableProviderFor() must implement interface OCP\Authentication\TwoFactorAuth\IProvider, null given, called in /var/www/nextcloud/apps/twofactor_yubikey/lib/Service/Yubiotp.php on line 182

and
The each() function is deprecated. This message will be suppressed on further calls at /var/www/nextcloud/apps/twofactor_yubikey/vendor/auth_yubico/Yubico.php#395

The user will not be able to log in afterwards because Nextcloud requires authentication with YubiKey
How can I fix that?

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