Closed nervebehale closed 5 years ago
Please fill out the full issue template from https://github.com/nextcloud/twofactor_totp/issues/new?template=bug.md
The app works fine on my dev and production server. Please share your error logs.
Error | PHP | pack(): 64-bit format codes are not available for 32-bit versions of PHP at /var/www/nextcloud/apps/twofactor_totp/vendor/rullzer/easytotp/src/TOTP.php#100
TypeError: hash_hmac() expects parameter 2 to be string, boolean given
/var/www/nextcloud/apps/twofactor_totp/vendor/rullzer/easytotp/src/TOTP.php - line 102:
hash_hmac("sha1", false, null, true)
/var/www/nextcloud/apps/twofactor_totp/vendor/rullzer/easytotp/src/TOTP.php - line 63:
EasyTOTP\TOTP->hotp(52169579)
/var/www/nextcloud/apps/twofactor_totp/lib/Service/Totp.php - line 146:
EasyTOTP\TOTP->verify("534540", 3, null)
/var/www/nextcloud/apps/twofactor_totp/lib/Service/Totp.php - line 102:
OCA\TwoFactorTOTP\Service\Totp->validateSecret(OC\User\User {}, "534540")
/var/www/nextcloud/apps/twofactor_totp/lib/Controller/SettingsController.php - line 97:
OCA\TwoFactorTOTP\Service\Totp->enable(OC\User\User {}, "534540")
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 166:
OCA\TwoFactorTOTP\Controller\SettingsController->enable(2, "534540")
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 99:
OC\AppFramework\Http\Dispatcher->executeController(OCA\TwoFacto ... {}, "enable")
/var/www/nextcloud/lib/private/AppFramework/App.php - line 126:
OC\AppFramework\Http\Dispatcher->dispatch(OCA\TwoFacto ... {}, "enable")
/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:
OC\AppFramework\App::main("OCA\\TwoFac ... r", "enable", OC\AppFramew ... {}, { _route: "t ... "})
<<closure>>
OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "t ... "})
/var/www/nextcloud/lib/private/Route/Router.php - line 297:
call_user_func(OC\AppFramew ... {}, { _route: "t ... "})
/var/www/nextcloud/lib/base.php - line 975:
OC\Route\Router->match("/apps/twofa ... e")
/var/www/nextcloud/index.php - line 42:
OC::handleRequest()
NGINX, ODROID XU4 (armh), MySQL without 4 -Byte!, php -v PHP 7.2.19-0ubuntu0.18.04.1 (cli) (built: Jun 4 2019 14:48:12) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.19-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies
thanks for the info. I pinged @rullzer, the author of easytotp
i'm having the same issue with the same log output ever since updating TOTP app this afternoon
browser gives me "Internal Server Error. The server was unable to complete your request. If this happens again, please send the technical details below to the server administrator. More details can be found in the server log."
server info Raspbian GNU/Linux 10 (buster) kernel 4.19.58-v7+ Server version: Apache/2.4.38 mariadb Ver 15.1 Distrib 10.3.15-MariaDB PHP 7.3.4-2 (Zend Engine v3.3.4, Zend OPcache v7.3.4-2) Nextcloud 16.0.3
apps
Yep, the problem is the 32bit installation that can't handle large numbers used for the crypto magic inside the OTP implementation. So far I have not found any compatibility abstractions for 32bit that we could integrate. But if anybody knows some lib that could help please let us know.
In the meantime I would suggest manually going back to the previous version. You'll find a tarball on the releases page of this repo.
Sorry for the inconveniences caused.
Could you check with https://github.com/rullzer/easytotp/pull/2 as patch for easyotp?
It should be proper 32 bit support again then
See https://github.com/nextcloud/twofactor_totp/pull/640 for an RC
Steps to reproduce
Expected behaviour
no 2factor authentication possible i use 3 Android apps, always the same error