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

fixed crash related to tracking delete events #96 #1703

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

bryanmontz
Copy link
Contributor

Issues covered

https://github.com/verse-pbc/issues/issues/96

Description

The issue was an unprotected direct array access and unexpected tags in an event. Direct array access must always be preceded by a count check on the array or by using a "safe" function that does that internally.

How to test

  1. Navigate to main feed
  2. Scroll around for a while until receiving a delete event with tags other than "e" tags in it

@joshuatbrown
Copy link
Contributor

I did a little digging and am wondering why this code started crashing -- it looks like trackDelete hasn't been modified since 2023. Maybe people started using deletes more in Nos or other apps?

@mplorentz
Copy link
Member

I did a little digging and am wondering why this code started crashing -- it looks like trackDelete hasn't been modified since 2023. Maybe people started using deletes more in Nos or other apps?

I bet someone posted a malformed delete event. An e tag with no ID in position 1.

Copy link
Member

@mplorentz mplorentz left a comment

Choose a reason for hiding this comment

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

Looks good!

@bryanmontz bryanmontz added this pull request to the merge queue Dec 19, 2024
Merged via the queue into main with commit 963318f Dec 19, 2024
4 checks passed
@bryanmontz bryanmontz deleted the bdm/96-track-delete-crash branch December 19, 2024 12:42
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