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

TOTP plugin is dependent on ctype #1250

Closed
msimerson opened this issue Sep 21, 2023 · 0 comments
Closed

TOTP plugin is dependent on ctype #1250

msimerson opened this issue Sep 21, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@msimerson
Copy link

The Bug

Unable to set up the Two factor plugin due to undeclared dependency on PHP ctype plugin.

To Reproduce

  1. install snappymail
  2. verify all the PHP plugins are present in Admin -> About -> PHP optional extensions
  3. Enable Extensions -> Two Factor Authentication
  4. Log in a normal user
  5. Attempt to Activate TOTP in the UI
  6. Page fails to load UI for setting up TOTP
  7. Enable Snappymail application logs
  8. Determine what this entry means:
[2023-09-20 22:16:09.957][ad7382c3] SERVICE[WARNING]: Call to undefined function ctype_digit()
#0 /usr/local/www/snappymail/snappymail/v/2.28.4/app/libraries/snappymail/qrcode.php(1031): SnappyMail\QRData::detectMode()
#1 /usr/local/www/snappymail/snappymail/v/2.28.4/app/libraries/snappymail/qrcode.php(99): SnappyMail\QRData->__construct()
#2 /usr/local/www/snappymail/snappymail/v/2.28.4/app/libraries/snappymail/qrcode.php(425): SnappyMail\QRCode->addData()
#3 /data/_data_/_default_/plugins/two-factor-auth/index.php(138): SnappyMail\QRCode::getMinimumQRCode()
#4 /data/_data_/_default_/plugins/two-factor-auth/index.php(126): TwoFactorAuthPlugin::getQRCode()
#5 /usr/local/www/snappymail/snappymail/v/2.28.4/app/libraries/RainLoop/Plugins/Manager.php(372): TwoFactorAuthPlugin->DoCreateTwoFactorSecret()
#6 /usr/local/www/snappymail/snappymail/v/2.28.4/app/libraries/RainLoop/ServiceActions.php(145): RainLoop\Plugins\Manager->RunAdditionalJson()
#7 /usr/local/www/snappymail/snappymail/v/2.28.4/app/libraries/RainLoop/Service.php(132): RainLoop\ServiceActions->ServiceJson()
#8 /usr/local/www/snappymail/snappymail/v/2.28.4/app/libraries/RainLoop/Service.php(14): RainLoop\Service::RunResult()
#9 /usr/local/www/snappymail/snappymail/v/2.28.4/include.php(143): RainLoop\Service::Handle()
#10 /usr/local/www/snappymail/index.php(11): include('...')
#11 {main}
  1. Install ctype plugin and restart PHP FPM
  2. Rejoice. 🎉

Environment

  • Browser: Safari, Firefox, Chrome
  • IMAP daemon: dovecot
  • PHP version: 8.2.10
  • SnappyMail Version: 2.28.4
  • Mode: standalone
@the-djmaze the-djmaze added the enhancement New feature or request label Oct 2, 2023
the-djmaze pushed a commit that referenced this issue Mar 4, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants