Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profile: read contacts fields safely #4281

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Conversation

Fang-
Copy link
Member

@Fang- Fang- commented Dec 13, 2024

types. It checked for the tags on values found in the map. However, it's possible for values to be null, in which case trying to grab the head would crash at runtime.

Here, we update the typecheck to check on the full value as opposed to just the head.

Since this crashing code might have run in response to a contacts subscription update, killing the subscription, we add a bit of logic to +on-load to ensure that the contacts subscription gets set up again if needed.

types. It checked for the tags on values found in the map. However, it's
possible for values to be null, in which case trying to grab the head
would crash at runtime.

Here, we update the typecheck to check on the full value as opposed to
just the head.

Since this crashing code might have run in response to a contacts
subscription update, killing the subscription, we add a bit of logic to
+on-load to ensure that the contacts subscription gets set up again if
needed.
Copy link
Member

@arthyn arthyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@arthyn
Copy link
Member

arthyn commented Dec 13, 2024

we can get it out quicker if you merge to staging

@Fang-
Copy link
Member Author

Fang- commented Dec 13, 2024

The change that was dangerous was in #4267, which is only on develop, hasn't made it to staging yet.

@Fang- Fang- merged commit c56796a into develop Dec 13, 2024
1 check passed
@Fang- Fang- deleted the m/profile-contacts-safer branch December 13, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants