the-djmaze / snappymail

Simple, modern & fast web-based email client
https://snappymail.eu
GNU Affero General Public License v3.0
1.01k stars 121 forks source link

TOTP QR code not readable #360

Closed winkelement closed 2 years ago

winkelement commented 2 years ago

Describe the bug The generated QR code for the 2FA auth activation can not be read by Google Authenticator or Authy App. To Reproduce Steps to reproduce the behavior:

  1. Go to '#/settings/two-factor-auth'
  2. Click on 'Activate'
  3. Try to scan the QR code with TOTP App
  4. QR Code will not be recognised

Expected behavior A TOTP App like GA or Authy should be able to successfully scan the QR code.

Screenshots

Screenshot 2022-05-01 at 21 07 10 Screenshot 2022-05-01 at 21 09 16

Desktop (please complete the following information):

APPLICATION LOG

[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Return type of RainLoop\Config\AbstractConfig::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /snappymail/snappymail/v/2.15.1/app/libraries/RainLoop/Config/AbstractConfig.php on line 58"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Return type of RainLoop\Plugins\Property::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /snappymail/snappymail/v/2.15.1/app/libraries/RainLoop/Plugins/Property.php on line 154"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Return type of RainLoop\Model\Account::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /snappymail/snappymail/v/2.15.1/app/libraries/RainLoop/Model/Account.php on line 133"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Return type of RainLoop\Model\Domain::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /snappymail/snappymail/v/2.15.1/app/libraries/RainLoop/Model/Domain.php on line 403"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Implicit conversion from float 2655.2191380569757 to int loses precision in /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php on line 660"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Implicit conversion from float 2607.3878743608475 to int loses precision in /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php on line 660"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Implicit conversion from float 2615.9495982468957 to int loses precision in /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php on line 660"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Implicit conversion from float 2319.264426588751 to int loses precision in /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php on line 660"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Implicit conversion from float 2223.3878743608475 to int loses precision in /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php on line 660"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Implicit conversion from float 2489.118334550767 to int loses precision in /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php on line 660"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Implicit conversion from float 2359.972242512783 to int loses precision in /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php on line 660"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Implicit conversion from float 2578.3652300949598 to int loses precision in /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php on line 660"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Implicit conversion from float 2655.2191380569757 to int loses precision in /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php on line 660"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Implicit conversion from float 2607.3878743608475 to int loses precision in /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php on line 660"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Implicit conversion from float 2615.9495982468957 to int loses precision in /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php on line 660"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Implicit conversion from float 2319.264426588751 to int loses precision in /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php on line 660"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Implicit conversion from float 2223.3878743608475 to int loses precision in /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php on line 660"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Implicit conversion from float 2489.118334550767 to int loses precision in /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php on line 660"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Implicit conversion from float 2359.972242512783 to int loses precision in /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php on line 660"
[01-May-2022 21:23:31] WARNING: [pool default] child 256 said into stderr: "[01-May-2022 19:23:31 UTC] PHP Deprecated:  Implicit conversion from float 2578.3652300949598 to int loses precision in /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php on line 660"

--- FlushLogCache: WriteOnPhpErrorOnly
[2022-05-01 19:23:31.214][8774a9a3] INFO[DATA]: [DATE:2022-05-01 UTC][SM:2.15.1][IP:][PID:256][nginx/1.14.2][fpm-fcgi][Streams:tcp,udp,unix,udg,ssl,tls,tlsv1.0,tlsv1.1,tlsv1.2,tlsv1.3]
[2022-05-01 19:23:31.214][8774a9a3] REQUEST[NOTE]: [POST] http://localhost:8071/?/Json/&q[]=/0/
--- FlushLogCache: Trigger
[2022-05-01 19:23:31.216][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/RainLoop/Plugins/Property.php [line:154, code:8192]
[2022-05-01 19:23:31.218][8774a9a3] PHP[NOTICE]: Error: Return type of RainLoop\Plugins\Property::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
[2022-05-01 19:23:31.222][8774a9a3] JSON[NOTE]: Action: DoPluginCreateTwoFactorSecret
[2022-05-01 19:23:31.228][8774a9a3] POST[DATA]: {"Action":"PluginCreateTwoFactorSecret","XToken":"b77d32285607e3ef6efbc900d046a38876d5f13f"}
[2022-05-01 19:23:31.232][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/RainLoop/Model/Account.php [line:133, code:8192]
[2022-05-01 19:23:31.235][8774a9a3] PHP[NOTICE]: Error: Return type of RainLoop\Model\Account::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
[2022-05-01 19:23:31.247][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/RainLoop/Model/Domain.php [line:403, code:8192]
[2022-05-01 19:23:31.251][8774a9a3] PHP[NOTICE]: Error: Return type of RainLoop\Model\Domain::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
[2022-05-01 19:23:31.268][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php [line:660, code:8192]
[2022-05-01 19:23:31.271][8774a9a3] PHP[NOTICE]: Error: Implicit conversion from float 2655.2191380569757 to int loses precision
[2022-05-01 19:23:31.283][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php [line:660, code:8192]
[2022-05-01 19:23:31.286][8774a9a3] PHP[NOTICE]: Error: Implicit conversion from float 2607.3878743608475 to int loses precision
[2022-05-01 19:23:31.299][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php [line:660, code:8192]
[2022-05-01 19:23:31.302][8774a9a3] PHP[NOTICE]: Error: Implicit conversion from float 2615.9495982468957 to int loses precision
[2022-05-01 19:23:31.315][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php [line:660, code:8192]
[2022-05-01 19:23:31.331][8774a9a3] PHP[NOTICE]: Error: Implicit conversion from float 2319.264426588751 to int loses precision
[2022-05-01 19:23:31.347][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php [line:660, code:8192]
[2022-05-01 19:23:31.349][8774a9a3] PHP[NOTICE]: Error: Implicit conversion from float 2223.3878743608475 to int loses precision
[2022-05-01 19:23:31.360][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php [line:660, code:8192]
[2022-05-01 19:23:31.362][8774a9a3] PHP[NOTICE]: Error: Implicit conversion from float 2489.118334550767 to int loses precision
[2022-05-01 19:23:31.371][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php [line:660, code:8192]
[2022-05-01 19:23:31.373][8774a9a3] PHP[NOTICE]: Error: Implicit conversion from float 2359.972242512783 to int loses precision
[2022-05-01 19:23:31.385][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php [line:660, code:8192]
[2022-05-01 19:23:31.387][8774a9a3] PHP[NOTICE]: Error: Implicit conversion from float 2578.3652300949598 to int loses precision
[2022-05-01 19:23:31.409][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php [line:660, code:8192]
[2022-05-01 19:23:31.411][8774a9a3] PHP[NOTICE]: Error: Implicit conversion from float 2655.2191380569757 to int loses precision
[2022-05-01 19:23:31.421][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php [line:660, code:8192]
[2022-05-01 19:23:31.423][8774a9a3] PHP[NOTICE]: Error: Implicit conversion from float 2607.3878743608475 to int loses precision
[2022-05-01 19:23:31.432][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php [line:660, code:8192]
[2022-05-01 19:23:31.434][8774a9a3] PHP[NOTICE]: Error: Implicit conversion from float 2615.9495982468957 to int loses precision
[2022-05-01 19:23:31.445][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php [line:660, code:8192]
[2022-05-01 19:23:31.447][8774a9a3] PHP[NOTICE]: Error: Implicit conversion from float 2319.264426588751 to int loses precision
[2022-05-01 19:23:31.458][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php [line:660, code:8192]
[2022-05-01 19:23:31.473][8774a9a3] PHP[NOTICE]: Error: Implicit conversion from float 2223.3878743608475 to int loses precision
[2022-05-01 19:23:31.484][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php [line:660, code:8192]
[2022-05-01 19:23:31.487][8774a9a3] PHP[NOTICE]: Error: Implicit conversion from float 2489.118334550767 to int loses precision
[2022-05-01 19:23:31.498][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php [line:660, code:8192]
[2022-05-01 19:23:31.500][8774a9a3] PHP[NOTICE]: Error: Implicit conversion from float 2359.972242512783 to int loses precision
[2022-05-01 19:23:31.509][8774a9a3] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/snappymail/qrcode.php [line:660, code:8192]
[2022-05-01 19:23:31.512][8774a9a3] PHP[NOTICE]: Error: Implicit conversion from float 2578.3652300949598 to int loses precision
[2022-05-01 19:23:31.518][8774a9a3] JSON[DATA]: {"Action":"TwoFactorAuthPluginDoCreateTwoFactorSecret","Result":{"User":"XXX","IsSet":true,"Enable":false,"Secret":"JDHMOTL4Q7VJ2GFI","BackupCodes":"713785184 578438606 310455745 695884518 883353815 458601683 693058126 782063026 370986205","QRCode":"█▀▀▀▀▀█ ��...
[2022-05-01 19:23:31.521][8774a9a3] INFO[MEMORY]: Memory peak usage: 2MB
[2022-05-01 19:23:31.524][8774a9a3] INFO[TIME]: Time delta: 0.31544399261475
[01-May-2022 21:23:56] WARNING: [pool default] child 275 said into stderr: "[01-May-2022 19:23:56 UTC] PHP Deprecated:  Return type of RainLoop\Config\AbstractConfig::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /snappymail/snappymail/v/2.15.1/app/libraries/RainLoop/Config/AbstractConfig.php on line 58"
[01-May-2022 21:23:56] WARNING: [pool default] child 275 said into stderr: "[01-May-2022 19:23:56 UTC] PHP Deprecated:  Return type of RainLoop\Plugins\Property::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /snappymail/snappymail/v/2.15.1/app/libraries/RainLoop/Plugins/Property.php on line 154"

--- FlushLogCache: WriteOnPhpErrorOnly
[2022-05-01 19:23:56.562][25a1075e] INFO[DATA]: [DATE:2022-05-01 UTC][SM:2.15.1][IP:][PID:275][nginx/1.14.2][fpm-fcgi][Streams:tcp,udp,unix,udg,ssl,tls,tlsv1.0,tlsv1.1,tlsv1.2,tlsv1.3]
[2022-05-01 19:23:56.562][25a1075e] REQUEST[NOTE]: [POST] http://localhost:8071/?/Json/&q[]=/0/
--- FlushLogCache: Trigger
[2022-05-01 19:23:56.564][25a1075e] PHP[NOTICE]: /snappymail/snappymail/v/2.15.1/app/libraries/RainLoop/Plugins/Property.php [line:154, code:8192]
[2022-05-01 19:23:56.566][25a1075e] PHP[NOTICE]: Error: Return type of RainLoop\Plugins\Property::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
[2022-05-01 19:23:56.570][25a1075e] JSON[NOTE]: Action: DoAppDelayStart
[2022-05-01 19:23:56.574][25a1075e] POST[DATA]: {"Action":"AppDelayStart","XToken":"b77d32285607e3ef6efbc900d046a38876d5f13f"}
[2022-05-01 19:23:56.580][25a1075e] JSON[DATA]: {"Action":"AppDelayStart","Result":true,"Time":25}
[2022-05-01 19:23:56.584][25a1075e] INFO[MEMORY]: Memory peak usage: 2MB
[2022-05-01 19:23:56.587][25a1075e] INFO[TIME]: Time delta: 0.031663179397583
the-djmaze commented 2 years ago

Seems to be a font issue. What OS are you using? Is it fixed with above commit change?

winkelement commented 2 years ago

Seems to be a font issue. What OS are you using? Is it fixed with above commit change?

I'm using macOS 10.15.7. The issue is fixed with your commit (after clearing the cache) 🥳 Thank you!