-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
No QR code appearing in settings #17567
Comments
Hi @netfiesta 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 ? |
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. |
;) Could you add this lines in the file just after the line (100) I sent you: $this->xmlWriter->writeAttribute(
'transform-raw',
sprintf('(%s, %s)', $size, self::PRECISION)
); And then go back to the QR code page and send the HTML of the |
Hi again @williamdes, Sure, I just did, this is the output:
Is this what you need? |
Perfect ! I did narrow down this to <?php
setlocale(LC_ALL, 'fr');
$writer = new XMLWriter();
$writer->openURI('php://output');
$writer->startDocument('1.0','UTF-8');
$writer->setIndent(TRUE);
$size = 3.5087719298246;
$writer->startElement('g');
$writer->writeAttribute(
'transform',
sprintf('scale(%s)', round($size, 3))
); php -f test.php On my workstation it does output cc @DASPRiD (the author of the lib) |
Decimal point is different. I've also found another issue like this on Github PHPOffice/PHPWord#1268. <?php
setlocale(LC_ALL, 'fr_FR');
print_r(localeconv());
setlocale(LC_ALL, 'fr');
print_r(localeconv());
|
Ok, can I do anything more to help here...? |
Thank you for your help, no for now it's okay |
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! :-) |
FYI, there is a pull request to address this (for BaconQrCode v3), waiting for the author to address some outstanding issues: |
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:
I've also updated the Google2FA and Google2FA-QR libraries to it's latest versions which seems to be working fine.
The text was updated successfully, but these errors were encountered: