? ? ? Failure

User tests: Successful: Unsuccessful:

avatar nikosdion
nikosdion
8 Aug 2020

Summary of Changes

Changes the check in Joomla 4's implementation of WebAuthn to require either the GMP or the BCmatch PHP extension. You see, the library we use is compatible with both, despite what @PhilETaylor asserted ?

Testing Instructions

Disable the GMP PHP extension on your site but do enable BCmath.

Try to register a new Authenticator with WebAuthn.

Actual result BEFORE applying this Pull Request

You get an error message that the PHP extension GMP is required to register an authenticator.

Expected result AFTER applying this Pull Request

You can register your authentication just fine.

Documentation Changes Required

Changed the language string PLG_SYSTEM_WEBAUTHN_REQUIRES_GMP to reflect reality.

Further information

The requirement for GMP or BCmath comes from the third party library fgrosse/PHPASN1 which is in the WebAuthn library's dependency graph. That library had a TODO item to add a pure PHP implementation for big integer mathematics. In the past, I had used phpseclib/bcmath_compat to do exactly that. So I took it upon myself to file an upstream PR to the library.

Once the upstream PR is accepted and a new version is released we can run composer update on Joomla 4 and completely remove the GMP/BCmath check. You're welcome.

avatar nikosdion nikosdion - open - 8 Aug 2020
avatar nikosdion nikosdion - change - 8 Aug 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Aug 2020
Category Administration Language & Strings Layout
avatar nikosdion nikosdion - change - 8 Aug 2020
Labels Added: ? ?
avatar brianteeman brianteeman - test_item - 8 Aug 2020 - Tested successfully
avatar brianteeman
brianteeman - comment - 8 Aug 2020

I have tested this item successfully on b3b9765


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

avatar bonzani bonzani - test_item - 8 Aug 2020 - Tested successfully
avatar bonzani
bonzani - comment - 8 Aug 2020

I have tested this item successfully on b3b9765


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

avatar richard67 richard67 - change - 8 Aug 2020
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 8 Aug 2020

RTC


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

avatar wilsonge wilsonge - close - 8 Aug 2020
avatar wilsonge wilsonge - merge - 8 Aug 2020
avatar wilsonge wilsonge - change - 8 Aug 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-08-08 23:42:04
Closed_By wilsonge
Labels Added: ?
avatar wilsonge
wilsonge - comment - 8 Aug 2020

Thanks! (for this and the upstream PR!)

avatar nikosdion
nikosdion - comment - 22 Aug 2020

@wilsonge The upstream PR has been merged, see fgrosse/PHPASN1#80 (comment) You can run a composer update on Monday to pull the new code. If you also add a dependency to phpseclib/bcmath_compat the WebAuthn code will work even when neither the GMP nor the BCmath extensions are enabled on a server (I tested this by manually applying the upstream PR changes). This means that you can remove all of the now unnecessary checks for GMP in WebAuthn.

Add a Comment

Login with GitHub to post a comment