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

Emit finished() and delete remotely cancelled verification session #865

Open
wants to merge 1 commit into
base: 0.9.x
Choose a base branch
from

Conversation

KitsuneRal
Copy link
Member

Prevents a potential verification session leak but may break clients if they relied on the remotely cancelled session to still be around and not emit finished() - to me that feels like a misuse, so I'm sending this to 0.9.x even though this change may break this misuse.

Commit message with details:
KeyVerificationSession emits finished() and self-deletes on any wrong situation but only changes state if a remote device simply cancels the verification, as if it were not an endgame. This commit pulls the common code from cancelVerification() into handleCancel() and calls that new function when KeyVerificationCancelEvent is received. It also makes sure now not to call cancelVerification() twice with different error codes.

KeyVerificationSession emits finished() and self-deletes on any wrong
situation but only changes state if a remote device simply cancels the
verification, as if it were not an endgame. This commit pulls the common
code from cancelVerification() into handleCancel() and calls that new
function when KeyVerificationCancelEvent is received. It also makes sure
now not to call cancelVerification() twice with different error codes.
@KitsuneRal KitsuneRal added the bug/fix The library doesn't work as expected label Feb 3, 2025
Copy link

sonarqubecloud bot commented Feb 3, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/fix The library doesn't work as expected
Projects
Status: In work
Development

Successfully merging this pull request may close these issues.

1 participant