Add bcmath_compat polyfill for servers without BCmath / GMP support#38488
Merged
roland-d merged 2 commits intojoomla:4.2-devfrom Aug 17, 2022
nikosdion:fix/38485-mfa-bcmath
Merged
Add bcmath_compat polyfill for servers without BCmath / GMP support#38488roland-d merged 2 commits intojoomla:4.2-devfrom nikosdion:fix/38485-mfa-bcmath
roland-d merged 2 commits intojoomla:4.2-devfrom
nikosdion:fix/38485-mfa-bcmath
Conversation
Contributor
Author
|
There's one build failure in Drone but it seems it's not coming from this PR. |
Member
I've restarted it, and this time it worked. Sometimes we have that problem. |
wilsonge
approved these changes
Aug 17, 2022
Member
|
Works for me without bcmath and gmp, funny note I also have to remove libsodium. |
HLeithner
approved these changes
Aug 17, 2022
Contributor
|
Thanks everybody |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 installto 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: