This repository has been archived by the owner on Mar 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 263
Fix #2869 - never return nil as the base domain #2940
Merged
Merged
Conversation
This file contains 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
@tsekityam thank you for this patch! we are very close to code freeze for Focus 96, so I am not sure if this will ship in that release. But we will definitely pick this up for 97. |
st3fan
approved these changes
Jan 7, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. I am going to file a followup issue to improve the isIPv4
and isIPv6
functions.
@Mergifyio backport releases_v96 |
✅ Backports have been created
|
mergify bot
pushed a commit
that referenced
this pull request
Jan 7, 2022
* Fix #2869 - never return nil as the base domain * Return host if failed to extract the domain Co-authored-by: Stefan Arentz <[email protected]> (cherry picked from commit e2dc3a3)
mergify bot
added a commit
that referenced
this pull request
Jan 7, 2022
* Fix #2869 - never return nil as the base domain * Return host if failed to extract the domain Co-authored-by: Stefan Arentz <[email protected]> (cherry picked from commit e2dc3a3) Co-authored-by: Tse Kit Yam <[email protected]>
isabelrios
pushed a commit
to isabelrios/firefox-ios
that referenced
this pull request
Feb 14, 2024
…in (mozilla-mobile/focus-ios#2940) * Fix mozilla-mobile/focus-ios#2869 - never return nil as the base domain * Return host if failed to extract the domain Co-authored-by: Stefan Arentz <[email protected]>
isabelrios
pushed a commit
to isabelrios/firefox-ios
that referenced
this pull request
Feb 20, 2024
…he base domain (mozilla-mobile/focus-ios#2940) * Fix mozilla-mobile/focus-ios#2869 - never return nil as the base domain * Return host if failed to extract the domain Co-authored-by: Stefan Arentz <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
When the host is an IP address, the
baseDomain
will benil
. However, the UI fails to handlenil
properly and crashes.I think the best way to fix this issue is to not return
nil
in thebaseDomain
.This PR updates
baseDomain
function, such that ithost
ifhost
is an ip address (in ipv4 or ipv6)host
ifhost
is not FQDNhost
ifpublicSuffixFromHost
can extract it, otherwise returnshost
As a result, the UI will not be crashed because of the
nil
baseDomain