treat email addresses case-insensitively in conflict resolution#42
Merged
printminion-co merged 1 commit intofeature/provider_mails_adminfrom Feb 23, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves the robustness of the IONOS account conflict resolution by making email matching case-insensitive. Email addresses are case-insensitive per RFC 5321, so this change ensures proper matching regardless of casing variations that might be returned from the API.
Changes:
- Updated email comparison logic in IonosAccountConflictResolver to use strcasecmp for case-insensitive comparison
- Added comprehensive test to verify case-insensitive email matching works correctly
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lib/Provider/MailAccountProvider/Implementations/Ionos/Service/IonosAccountConflictResolver.php | Changed email comparison from strict equality to case-insensitive strcasecmp |
| tests/Unit/Provider/MailAccountProvider/Implementations/Ionos/Service/IonosAccountConflictResolverTest.php | Added test case for case-insensitive email matching with uppercase email from API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ively in conflict resolution Replace strict === comparison with strcasecmp() in IonosAccountConflictResolver so that foo@bar.lol and FOO@BAR.LOL resolve to the same account, consistent with all other email comparisons in the codebase. Add a unit test covering the case where the IONOS API returns an email in different casing than the requested address. Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
c6bf308 to
caffda3
Compare
abec44f
into
feature/provider_mails_admin
6 of 27 checks passed
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.
This pull request improves the handling of email address comparisons in the IONOS account conflict resolution logic by making the comparison case-insensitive. Additionally, it adds a new unit test to ensure this behavior is correctly implemented.
Conflict resolution improvements:
IonosAccountConflictResolver.phpto use a case-insensitive check (strcasecmp) when determining if the retrieved email matches the expected email address. This ensures that email addresses with different casing are treated as equivalent.Testing enhancements:
testResolveConflictWithMatchingEmailCaseInsensitiveinIonosAccountConflictResolverTest.phpto verify that the conflict resolver correctly handles email addresses that differ only in case, ensuring the new logic is covered by tests.