User tests: Successful: Unsuccessful:
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
Disable the GMP PHP extension on your site but do enable BCmath.
Try to register a new Authenticator with WebAuthn.
You get an error message that the PHP extension GMP is required to register an authenticator.
You can register your authentication just fine.
Changed the language string PLG_SYSTEM_WEBAUTHN_REQUIRES_GMP
to reflect reality.
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.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration Language & Strings Layout |
Labels |
Added:
?
?
|
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
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:
?
|
Thanks! (for this and the upstream PR!)
@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.
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.