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] When click on Two-factor Authentication . Manage two-factor authentication #1601

Closed
abhishekbeesony opened this issue Apr 28, 2023 · 2 comments
Labels

Comments

@abhishekbeesony
Copy link

Describe the bug
After installation, when I access my profile and choose the "Manage two-factor authentication" option, that points to /twoFA/edit , I get a
This page isn’t working127.0.0.1 is currently unable to handle this request.
HTTP ERROR 500

The error log file remains blank.

To Reproduce
Steps to reproduce the behavior:

Install Leantime normally
Log in with the first user created
Go to the profile, on /users/editOwn/
Click on "Manage two-factor authentication"

Expected behavior
Be able to access the 2FA management feature

Leantime Version
latest version

Server
windows
xampp

PHP / MySQL Version
PHP 8.2 FPM
MariaDB 10.5.8

image

@abhishekbeesony
Copy link
Author

abhishekbeesony commented Apr 28, 2023

Hi @marcelfolaron , kindly help on the below issue.

[28-Apr-2023 14:51:07 Europe/Stockholm] RuntimeException: Index invalid or out of range in /var/www/html/vendor/bacon/bacon-qr-code/src/Encoder/MaskUtil.php:134
Stack trace:
#0 /var/www/html/vendor/bacon/bacon-qr-code/src/Encoder/Encoder.php(197): BaconQrCode\Encoder\MaskUtil::applyMaskPenaltyRule3(Object(BaconQrCode\Encoder\ByteMatrix))
#1 /var/www/html/vendor/bacon/bacon-qr-code/src/Encoder/Encoder.php(244): BaconQrCode\Encoder\Encoder::calculateMaskPenalty(Object(BaconQrCode\Encoder\ByteMatrix))
#2 /var/www/html/vendor/bacon/bacon-qr-code/src/Encoder/Encoder.php(135): BaconQrCode\Encoder\Encoder::chooseMaskPattern(Object(BaconQrCode\Common\BitArray), Object(BaconQrCode\Common\ErrorCor
#3 /var/www/html/vendor/endroid/qr-code/src/QrCode.php(434): BaconQrCode\Encoder\Encoder::encode('otpauth://totp/...', Object(BaconQrCode\Common\ErrorCorrectionLevel), 'UTF-8')
#4 /var/www/html/vendor/endroid/qr-code/src/Writer/PngWriter.php(30): Endroid\QrCode\QrCode->getData()
#5 /var/www/html/vendor/endroid/qr-code/src/QrCode.php(402): Endroid\QrCode\Writer\PngWriter->writeString(Object(Endroid\QrCode\QrCode))
#6 /var/www/html/app/domain/twoFA/controllers/class.edit.php(112): Endroid\QrCode\QrCode->writeString()
#7 /var/www/html/vendor/robthree/twofactorauth/lib/TwoFactorAuth.php(207): leantime\domain\controllers\TwoFAQRCode->getQRCodeImage('otpauth://totp/...', 200)
#8 /var/www/html/app/domain/twoFA/controllers/class.edit.php(86): RobThree\Auth\TwoFactorAuth->getQRCodeImageAsDataUri('admin@admin.com', 'JTQE3WQNXXJMEK4...')
#9 /var/www/html/app/core/class.controller.php(63): leantime\domain\controllers\edit->run()
#10 /var/www/html/app/core/class.controller.php(33): leantime\core\controller->executeActions('get', Array)
#11 /var/www/html/app/core/class.frontcontroller.php(176): leantime\core\controller->__construct('get', Array)
#12 /var/www/html/app/core/class.frontcontroller.php(98): leantime\core\frontcontroller::executeAction('twoFA.edit', Array, 200)
#13 /var/www/html/app/core/class.application.php(127): leantime\core\frontcontroller::dispatch()
#14 /var/www/html/public/index.php(26): leantime\core\application->start()

@nebulade
Copy link

Came here to report this as well, a Cloudron user just reported the same issue. Was there any solution to this, since it is marked as closed?

Trace looks slightly different with recent version 2.4.8

[24-Dec-2023 02:16:57 America/Los_Angeles] PHP Fatal error:  Uncaught RuntimeException: Index invalid or out of range in /app/code/vendor/bacon/bacon-qr-code/src/Encoder/MaskUtil.php:106
Stack trace:
#0 /app/code/vendor/bacon/bacon-qr-code/src/Encoder/Encoder.php(197): BaconQrCode\Encoder\MaskUtil::applyMaskPenaltyRule3()
#1 /app/code/vendor/bacon/bacon-qr-code/src/Encoder/Encoder.php(244): BaconQrCode\Encoder\Encoder::calculateMaskPenalty()
#2 /app/code/vendor/bacon/bacon-qr-code/src/Encoder/Encoder.php(135): BaconQrCode\Encoder\Encoder::chooseMaskPattern()
#3 /app/code/vendor/endroid/qr-code/src/QrCode.php(434): BaconQrCode\Encoder\Encoder::encode()
#4 /app/code/vendor/endroid/qr-code/src/Writer/PngWriter.php(30): Endroid\QrCode\QrCode->getData()
#5 /app/code/vendor/endroid/qr-code/src/QrCode.php(402): Endroid\QrCode\Writer\PngWriter->writeString()
#6 /app/code/app/Domain/TwoFA/Controllers/Edit.php(135): Endroid\QrCode\QrCode->writeString()
#7 /app/code/vendor/robthree/twofactorauth/lib/TwoFactorAuth.php(207): Leantime\Domain\TwoFA\Controllers\TwoFAQRCode->getQRCodeImage()
#8 /app/code/app/Domain/TwoFA/Controllers/Edit.php(96): RobThree\Auth\TwoFactorAuth->getQRCodeImageAsDataUri()
#9 /app/code/app/Core/Controller.php(102): Leantime\Domain\TwoFA\Controllers\Edit->run()
#10 /app/code/app/Core/Controller.php(59): Leantime\Core\Controller->executeActions()
#11 [internal function]: Leantime\Core\Controller->__construct()
#12 /app/code/vendor/illuminate/container/Container.php(929): ReflectionClass->newInstanceArgs()
#13 /app/code/vendor/illuminate/container/Container.php(770): Illuminate\Container\Container->build()
#14 /app/code/vendor/illuminate/container/Container.php(706): Illuminate\Container\Container->resolve()
#15 /app/code/app/Core/Frontcontroller.php(120): Illuminate\Container\Container->make()
#16 /app/code/app/Core/Frontcontroller.php(74): Leantime\Core\Frontcontroller::executeAction()
#17 /app/code/app/Core/Bootloader.php(411): Leantime\Core\Frontcontroller::dispatch()
#18 /app/code/app/Core/Bootloader.php(165): Leantime\Core\Bootloader->handleRequest()
#19 /app/code/public/index.php(14): Leantime\Core\Bootloader->boot()
#20 {main}
  thrown in /app/code/vendor/bacon/bacon-qr-code/src/Encoder/MaskUtil.php on line 106

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

No branches or pull requests

2 participants