Skip to content

No QR code appearing in settings #17567

Description

@netfiesta

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:

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="200" height="200" viewBox="0 0 200 200">
<rect x="0" y="0" width="200" height="200" fill="#fefefe"></rect>
<g transform="scale(3,509)">
<g transform="translate(4,4)"><path fill-rule="evenodd" d="[LONG QR CODE]" fill="#000000"></path></g></g></svg>

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA problem or regression with an existing featurewaiting on upstreamIssues blocked by a third-party

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions