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

Attempt to reestablish a session when it's found to be corrupt. #287

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

rubdos
Copy link
Member

@rubdos rubdos commented Jan 15, 2024

@direc85 and me found some corrupt sessions in the database. Since whisperfish/libsignal-client@601454d20, libsignal-protocol forwards corruption as SessionNotFound errors, which makes me believe we're allowed to recreate said session. This patch implements exactly that.

This deviates from the behaviour at the Android side, as far as I can tell, so needs caution. I tested this in the Whisperfishers group, seems to behave as intended.

FWIW, I blame said session corruption on going back-and-forth between the Kyber and pre-Kyber code a few times. I recall doing that and not turning off my network by accident.

@rubdos rubdos requested a review from gferon January 15, 2024 13:07
@rubdos rubdos marked this pull request as ready for review January 15, 2024 13:10
@gferon
Copy link
Collaborator

gferon commented Jan 15, 2024

Nice! I'll give it a look tomorrow morning if that's ok.

Copy link
Collaborator

@gferon gferon left a comment

Choose a reason for hiding this comment

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

LGTM! Can you maybe drop a comment on top of the loop?

@rubdos rubdos enabled auto-merge January 17, 2024 10:01
@rubdos rubdos merged commit 0ad842f into main Jan 17, 2024
19 checks passed
@rubdos rubdos deleted the session-corruption branch January 17, 2024 10:02
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.

2 participants