? ? Success

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
23 Mar 2016

Pull Request for Issue #9507.

Summary of Changes

This solves the php fatal error in #9507 by adding a warning message when mcrypt php extension is not enabled.

Testing Instructions

Before applying this PR patch is the issue described in #9507.

Test if 2FA still works as before.

  1. Install Joomla with latest staging
  2. Apply patch
  3. Disable mcrypt and restart server
  4. Test configuring 2FA (see below) - you will get a warning message.
  5. Enable mcrypt and restart server
  6. Test configuring 2FA (see below)
  7. Now logout and try to login with 2FA
  8. Code review

Note: Test Frontend (profile) and Backend user edit.

How to test 2FA

  • Enable Google Authenticator two factor authentication plugin: Extensions > Plugins (twofactorauth)
  • Create a dummy user and configure it to use with Google Authenticator: Users > Manage > Edit (2FA tab)

Note: you can use a chrome plugin for configuring and using 2FA, for instance https://chrome.google.com/webstore/detail/authenticator/bhghoamapcdpbohphigoooaddinpkbai

Observations

Other PR related:

avatar andrepereiradasilva andrepereiradasilva - open - 23 Mar 2016
avatar andrepereiradasilva andrepereiradasilva - change - 23 Mar 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Mar 2016
Labels Added: ? ?
avatar brianteeman
brianteeman - comment - 23 Mar 2016
  1. Shouldnt it be an error not a warning
  2. How about "The mcrypt php extension is needed before you can enable Two Factor Authentication."
  3. Please alpha-order the new string
avatar andrepereiradasilva
andrepereiradasilva - comment - 23 Mar 2016

done, done and done

avatar andrepereiradasilva andrepereiradasilva - change - 23 Mar 2016
Title
Mcrypt disabled warning in Two Factor authentication
Mcrypt error message in Two Factor authentication
avatar andrepereiradasilva andrepereiradasilva - change - 23 Mar 2016
Title
Mcrypt error message in Two Factor authentication
Mcrypt error message in Two Factor Authentication
avatar brianteeman brianteeman - change - 23 Mar 2016
Category Language & Strings Plugins
avatar brianteeman brianteeman - change - 23 Mar 2016
Labels
avatar brianteeman brianteeman - change - 23 Mar 2016
Title
Mcrypt error message in Two Factor Authentication
Mcrypt disabled warning in Two Factor authentication
avatar brianteeman brianteeman - change - 23 Mar 2016
Milestone Added:
avatar andrepereiradasilva
andrepereiradasilva - comment - 25 Mar 2016

I noticed now that we still need to add this check in the frontend too.

avatar andrepereiradasilva
andrepereiradasilva - comment - 25 Mar 2016

ok done

avatar rdeutz rdeutz - change - 29 Apr 2016
Milestone Added:
avatar rdeutz rdeutz - change - 29 Apr 2016
Milestone Removed:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Removed:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Added:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Added:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Removed:
avatar mbabker
mbabker - comment - 8 May 2016

Looks fine to me...

avatar zero-24
zero-24 - comment - 10 May 2016

I have just send you a CS fix. This is on my testing list for this afternoon ;) andrepereiradasilva#43


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

avatar zero-24
zero-24 - comment - 10 May 2016

sorry one more andrepereiradasilva#44

avatar zero-24 zero-24 - test_item - 10 May 2016 - Tested successfully
avatar zero-24
zero-24 - comment - 10 May 2016

I have tested this item :white_check_mark: successfully on 7a6bbfa

Good one. Thanks. To the tester please note that the message is now an error and not a warning as on the screenshot.


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

avatar wilsonge wilsonge - change - 8 Jun 2016
Milestone Removed:
avatar Schmidie64
Schmidie64 - comment - 2 Aug 2016

@icampus
I have tested this item unsuccessfully.
I wasn't able to reproduce the warning.
After i install Google Authenticator Two Factor Authentication everything worked well and i not get a warning popup.

avatar brianteeman
brianteeman - comment - 2 Aug 2016

@Schmidie64 are you sure you were able to disable mcrypt? Did phpinfo confirm it? I know I was never able to successfully disable it on my system

avatar Schmidie64 Schmidie64 - test_item - 2 Aug 2016 - Tested unsuccessfully
avatar Schmidie64
Schmidie64 - comment - 2 Aug 2016

I have tested this item ? unsuccessfully on 7a6bbfa

@icampus
I have tested this item unsuccessfully.
I wasn't able to reproduce the warning.
After i install Google Authenticator Two Factor Authentication everything worked well and i not get a warning popup.


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

avatar mxkmp29
mxkmp29 - comment - 2 Aug 2016

I tested @icampus

How did you disable mcrypt on your system ?
I tried it on linux and had no success.

With mcrypt everything is working fine.


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

avatar andrepereiradasilva
andrepereiradasilva - comment - 2 Aug 2016

go to your php.ini look for this

extension=mcrypt.so

comment it

; extension=mcrypt.so

restart your apache/php or php-fpm server

avatar mxkmp29
mxkmp29 - comment - 2 Aug 2016

The php.ini doesn't contain this line.

"_[mcrypt]
; For more information about mcrypt settings see http://php.net/mcrypt-module-open

; Directory where to load mcrypt algorithms
; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt)
;mcrypt.algorithms_dir=

; Directory where to load mcrypt modes
; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt)
;mcrypt.modes_dir=_"


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

avatar andrepereiradasilva
andrepereiradasilva - comment - 2 Aug 2016

search for mcrypt in your php ini files, you will find something like extension = mcrypt.something it can deffer across Operating systems. That is the line you have to comment

avatar mxkmp29
mxkmp29 - comment - 2 Aug 2016

I found it on php.ini-pre1.7.2 and it was already comment


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

avatar brianteeman
brianteeman - comment - 2 Aug 2016

Managed to disable mcrypt this time not sure what I was doing wrong before and confirmed the fatal error

Unfortunately after applying the patch I still get the following fatal errors when I try to edit the user

[02-Aug-2016 13:31:54 Europe/London] PHP Notice: Use of undefined constant MCRYPT_RIJNDAEL_256 - assumed 'MCRYPT_RIJNDAEL_256' in /Applications/MAMP/htdocs/github-joomla-cms/libraries/fof/encrypt/aes.php on line 44
[02-Aug-2016 13:31:54 Europe/London] PHP Notice: Use of undefined constant MCRYPT_MODE_CBC - assumed 'MCRYPT_MODE_CBC' in /Applications/MAMP/htdocs/github-joomla-cms/libraries/fof/encrypt/aes.php on line 63
[02-Aug-2016 13:31:54 Europe/London] PHP Fatal error: Call to undefined function mcrypt_get_iv_size() in /Applications/MAMP/htdocs/github-joomla-cms/libraries/fof/encrypt/aes.php on line 144


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

avatar andrepereiradasilva
andrepereiradasilva - comment - 2 Aug 2016

maybe it's because of the conflicts... i need to fix and check first
will try to do this tonight.

avatar brianteeman
brianteeman - comment - 26 Aug 2016

@andrepereiradasilva could you check this please - also as fof has been updated you might not even need this PR anymore


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

avatar brianteeman brianteeman - change - 26 Aug 2016
Status Pending Information Required
Labels
avatar mbabker
mbabker - comment - 26 Aug 2016

Still needed as it's adding checks for a scenario when mcrypt isn't installed or enabled on the system. Just needs rebased first to see where things are at.

avatar andrepereiradasilva
andrepereiradasilva - comment - 26 Aug 2016

yes i can solve the conflict, but know the 2FA exists in some more places.
have to check then all later.

avatar andrepereiradasilva
andrepereiradasilva - comment - 27 Aug 2016

conflicts fixed.
ready to test.

please test so i don't need to fix conflicts yet again.

avatar andrepereiradasilva andrepereiradasilva - change - 27 Aug 2016
The description was changed
avatar andrepereiradasilva
andrepereiradasilva - comment - 27 Aug 2016

ok, sorry for that, but needed to solve additional issues.

Ready for tests

@brianteeman can you test?

avatar brianteeman brianteeman - change - 27 Aug 2016
Status Information Required Pending
Labels
avatar brianteeman brianteeman - test_item - 27 Aug 2016 - Tested successfully
avatar brianteeman
brianteeman - comment - 27 Aug 2016

I have tested this item successfully on 979004b


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

avatar andrepereiradasilva
andrepereiradasilva - comment - 27 Aug 2016

thanks @brianteeman

avatar andrepereiradasilva
andrepereiradasilva - comment - 27 Aug 2016

coorected text string as @mbabker comments

avatar wilsonge
wilsonge - comment - 3 Sep 2016

#11673 This should have been fixed with this FOF update

avatar andrepereiradasilva
andrepereiradasilva - comment - 3 Sep 2016

yes, it seems fixed. so no needs for mcrypt anymore right?

avatar andrepereiradasilva
andrepereiradasilva - comment - 3 Sep 2016

@wilsonge @mbabker if joomla now does not need mcrypt so #9508 AND #9532 should be reverted, and of course, this closed.

avatar andrepereiradasilva andrepereiradasilva - change - 3 Sep 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-09-03 23:13:00
Closed_By andrepereiradasilva
avatar wilsonge
wilsonge - comment - 3 Sep 2016

I guess it depends if the other libraries michael mentioned have since been patched?

avatar andrepereiradasilva
andrepereiradasilva - comment - 3 Sep 2016

ok, i see there is an issue for that #11398, will post there

Add a Comment

Login with GitHub to post a comment