Handle previously unhandled exceptions with social plugin and Hybridauth#4643
Merged
CaMer0n merged 3 commits intoe107inc:masterfrom Dec 29, 2021
Merged
Handle previously unhandled exceptions with social plugin and Hybridauth#4643CaMer0n merged 3 commits intoe107inc:masterfrom
social plugin and Hybridauth#4643CaMer0n merged 3 commits intoe107inc:masterfrom
Conversation
is a better name than `\social_login_config::getValidConfiguredProviderConfigs()` because the method does not validate the provider configs.
And add a check for those exceptions in `social_ui::generateSocialLoginSection()` Fixes: e107inc#4192
|
Code Climate has analyzed commit 3f59b3b and detected 9 issues on this pull request. Here's the issue category breakdown:
Note: there are 6 critical issues. The test coverage on the diff in this pull request is 72.7% (80% is the threshold). This pull request will bring the total coverage in the repository to 33.9% (0.1% change). View more on Code Climate. |
Member
|
Thank you @Deltik !! |
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.
Motivation and Context
#4192 – social login with FB - avoid fatal error if ID is missing
A frontend error should not happen if any social login provider is not configured correctly.
#4199 – handler dependent on social plugin
e107 should not break with a fatal error if the
socialplugin is removed.Description
e107::getUserProvider()no longer throws exceptions, as the client usages do not handle them. Instead, the exceptions are suppressed now.e_user_providermanually now has the option to un-suppress exceptions, which lets the admin verify that their configurations are valid at/e107_plugins/social/admin_config.php?mode=main&action=configure.e_user_providerwill no longer fatal error if thesocialplugin is removed.How Has This Been Tested?
Added tests for bad Hybridauth configurations and resulting exceptions that are either suppressed or rethrown
Types of Changes
Checklist