You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've upgraded from phpMyAdmin 5.0.2 to 5.2.0. Everything seems fine however after the upgrade the QR code to enable 2FA does not show up anymore. It shows a complete white block.
I did a inspect on the generated HTML code and notices this issue:
This <g transform="scale(3,509)"> seems to be incorrect. If I change the comma here to a dot, so 3.509 the QR shows fine.
I now made a workaround to fix this but of course it's a workaround...
I've added the following CSS to \templates\preferences\two_factor\configure.twig:
<style>
/* Added because QR would not appear because of scale(3,509) value instead of 3.509 (dot instead of comma). */
svg > g {scale: 3.5;}
</style>
I've also updated the Google2FA and Google2FA-QR libraries to it's latest versions which seems to be working fine.
Thansk for your quick reply. Sure, my environment is a Windows Server 2019 with PHP 7.4.29 x64 NTS and MySQL 8.0.2.
Hmmm, i'm not really a PHP guru, however I have skills in HTML, CSS, JS and C# (.NET) so no clue how I can debug these input values, but maybe you can help me a little with that? ;-)
Thansk for your quick reply. Sure, my environment is a Windows Server 2019 with PHP 7.4.29 x64 NTS and MySQL 8.0.2. Hmmm, i'm not really a PHP guru, however I have skills in HTML, CSS, JS and C# (.NET) so no clue how I can debug these input values, but maybe you can help me a little with that? ;-)
;)
Could you add this lines in the file just after the line (100) I sent you: phpMyAdminFolder/vendor/bacon/bacon-qr-code/src/Renderer/Image/SvgImageBackEnd.php
Thank you for your help, no for now it's okay I will try do make a fix
OK, that's great! For now I fixed it with the CSS workaround I made, at least it shows the QR again, but a definate solution would be great! Thanks again for the quick reply! :-)
Activity
williamdes commentedon May 30, 2022
Hi @netfiesta
Could you share the server specific informations ?
What processor architecture do you have ?
Here is the source: https://github.com/Bacon/BaconQrCode/blob/d70c840f68657ce49094b8d91f9ee0cc07fbf66c/src/Renderer/Image/SvgImageBackEnd.php#L100
Could you debug what the input values are ?
netfiesta commentedon May 30, 2022
Hello @williamdes,
Thansk for your quick reply. Sure, my environment is a Windows Server 2019 with PHP 7.4.29 x64 NTS and MySQL 8.0.2.
Hmmm, i'm not really a PHP guru, however I have skills in HTML, CSS, JS and C# (.NET) so no clue how I can debug these input values, but maybe you can help me a little with that? ;-)
williamdes commentedon May 30, 2022
;)
Could you add this lines in the file just after the line (100) I sent you:
phpMyAdminFolder/vendor/bacon/bacon-qr-code/src/Renderer/Image/SvgImageBackEnd.phpAnd then go back to the QR code page and send the HTML of the
<svgzone ?netfiesta commentedon May 30, 2022
Hi again @williamdes,
Sure, I just did, this is the output:
Is this what you need?
williamdes commentedon May 30, 2022
Perfect !
This strange, the xml writer maybe uses some system specific setting to format floats
I did narrow down this to
test.phpOn my workstation it does output
<g transform="scale(3.509)"cc @DASPRiD (the author of the lib)
liviuconcioiu commentedon May 31, 2022
Decimal point is different. I've also found another issue like this on Github PHPOffice/PHPWord#1268.
netfiesta commentedon May 31, 2022
Ok, can I do anything more to help here...?
williamdes commentedon May 31, 2022
Thank you for your help, no for now it's okay
I will try do make a fix
netfiesta commentedon May 31, 2022
OK, that's great! For now I fixed it with the CSS workaround I made, at least it shows the QR again, but a definate solution would be great! Thanks again for the quick reply! :-)
DASPRiD commentedon Apr 18, 2024
FYI, there is a pull request to address this (for BaconQrCode v3), waiting for the author to address some outstanding issues:
Bacon/BaconQrCode#177