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

Fix panic for fetching group avatar #291

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

Schmiddiii
Copy link
Contributor

@Schmiddiii Schmiddiii commented Feb 21, 2024

Tracing assumed the path was always at least 4 characters long. This would panic with the empty path which can be the value of a group avatar path if no avatar is set for the group.

While this panic is easy to prevent in presage (which I also did here), this panic should still be removed from libsignal-service-rs.

(CI failure is again in nightly and most likely not my fault)

Tracing assumed the path was always at least 4 characters long. This
would panic with the empty path which can be the value of a group avatar
path if no avatar is set for the group.

While this panic is easy to prevent in presage (which I also did
[here](whisperfish/presage@1852f52#diff-99551c60a775f81baa1c0f5ba314ab329a8b187a979ece33826b3f98a02c3fa3R502)), this panic should still be removed from libsignal-service-rs.
@rubdos
Copy link
Member

rubdos commented Feb 22, 2024

This would panic with the empty path which can be the value of a group avatar path if no avatar is set for the group.

I don't think you should call this method when you know the avatar is not set, but I agree it shouldn't panic in that case.

@rubdos rubdos merged commit 1a8cdf8 into whisperfish:main Feb 22, 2024
15 of 18 checks passed
@Schmiddiii Schmiddiii deleted the fix-panic-group-avatar branch February 22, 2024 09:19
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