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

Fix QR-Code for 2FA #24255

Merged
merged 13 commits into from Apr 2, 2019

Conversation

Projects
None yet
10 participants
@bembelimen
Copy link
Contributor

commented Mar 20, 2019

Pull Request for Issue #24252 .

Summary of Changes

Implements an internal QR-Code generator instead of the google charts.

Testing Instructions

Activate the Google Authenticator 2FA plugin and set up 2FA for one user.

Expected result

QR-Code visible

Actual result

QR-Code broken

@brianteeman

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2019

Thank you for such a speedy response. I will test his in the morning

@ReLater

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2019

I have tested this item successfully on 550ddf2

Before patch: No QR code.
After patch: QR code created.

I could not test if QR code is scannable and/or correct. Decide yourself if that's a successful test!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24255.

bembelimen and others added some commits Mar 20, 2019

PHP 5.3 compatibility
Co-Authored-By: bembelimen <bembelimen@users.noreply.github.com>
HTMLHelper::_('script', 'plg_twofactorauth_totp/qrcode.min.js', array('version' => 'auto', 'relative' => true));
$js = "

This comment has been minimized.

Copy link
@C-Lodder

C-Lodder Mar 20, 2019

Member

Can you not put this in a separate file in the media directory so it doesn't need to be done for J4?

This comment has been minimized.

Copy link
@HLeithner

HLeithner Mar 20, 2019

Member

Joomla 4 should get a webcomponent for displaying qrcodes.

This comment has been minimized.

Copy link
@C-Lodder

C-Lodder Mar 20, 2019

Member

Even if that's the case, any new additional JS for J3 should be whacked in a separate file so that it makes the migration a lot easier

This comment has been minimized.

Copy link
@HLeithner

HLeithner Mar 20, 2019

Member

Github fools me... you mean the inline js should be moved. ok that makes sense

This comment has been minimized.

Copy link
@C-Lodder

C-Lodder Mar 20, 2019

Member

sorry, I probably should be moved my comment down a couple more lines :)

@HLeithner HLeithner requested a review from wilsonge as a code owner Apr 2, 2019

@HLeithner HLeithner added this to the Joomla 3.9.5 milestone Apr 2, 2019

@wilsonge

This comment has been minimized.

Copy link
Contributor

commented Apr 2, 2019

For my own reference when it comes to J4 the library is https://github.com/kazuhikoarase/qrcode-generator/blob/master/js/package.json#L2

@HLeithner HLeithner merged commit f4ef944 into joomla:staging Apr 2, 2019

4 checks passed

Hound No violations found. Woof!
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/drone/pr the build was successful
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@HLeithner

This comment has been minimized.

Copy link
Member

commented Apr 2, 2019

thx

@deroderuiter

This comment has been minimized.

Copy link

commented Apr 9, 2019

I installed 3.9.5 but the fix for the QR-Code for 2FA still does not work on my Joomla installation. Do I have do to something special to get it working again?

@HLeithner

This comment has been minimized.

Copy link
Member

commented Apr 9, 2019

@deroderuiter strange I tested it again and it works for me, do you have a screenshot and could you create a new issue.

@deroderuiter

This comment has been minimized.

Copy link

commented Apr 9, 2019

There is not much to show. In edit profile I choose the tab Two Factor Authentication, I scan the QR code with the Google Authenticator App on my smartphone and fill in the code and save the page. No error is displayed but the tow factor authentication is not activated.

@deroderuiter

This comment has been minimized.

Copy link

commented Apr 9, 2019

I saw I remark of Phil Taylor that Google no longer provides a chart API for QR Code. It was actually deprecated in 2012 and turned off Completely on March 18,2019
My English i not so good and I don't know if I understood this correctly and if it is correct it could explain why 2FA doesn't work anymore.

@brianteeman

This comment has been minimized.

Copy link
Contributor

commented Apr 9, 2019

if you see the qr code then the issue you refer to above is resolved as the qr code has been generated by different code

@deroderuiter

This comment has been minimized.

Copy link

commented Apr 9, 2019

So probably I have an other problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.