Add bcmath_compat polyfill for servers without BCmath / GMP support #38488
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request for Issue #38485.
Summary of Changes
Added the BCmath_compat polyfill from the well–known and well–trusted phpSecLib. This library adds a userland (pure PHP) implementation of the BCmath functions used by the third party dependencies of the WebAuthn code for BOTH logging in AND Multi-factor Authentication. If you try to use WebAuthn on a server which has neither the BCmath nor the GMP PHP extensions enabled the polyfill will kick in and let WebAuthn work properly.
Testing Instructions
composer install
to update the Composer dependencies.Actual result BEFORE applying this Pull Request
You receive the error “Requires GMP or bcmath extension”.
Expected result AFTER applying this Pull Request
Everything works fine.
Documentation Changes Required
In the requirements section for Joomla 4.2 we should add something along the lines of: