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

Element-R: await /keys/query during Verification requests #3932

Merged
merged 6 commits into from
Dec 5, 2023

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Nov 29, 2023

If the acceptance of an incoming verification request races with a /keys/query for the other user, then subsequent operations can fail (see matrix-org/matrix-rust-sdk#2896).

This is a slightly hacky workaround that means we wait for the devicelist to arrive for the relevant operations.

Required for a fix to element-hq/element-web#26420.


This change is marked as an internal change (Task), so will not be included in the changelog.

@richvdh richvdh added the T-Task Tasks for the team like planning label Dec 1, 2023
Copy link
Member

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

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

Looks sensible, but I need a little more explanation to understand it I think.

@@ -322,6 +333,10 @@ export class RustVerificationRequest
throw new Error(`Unsupported verification method ${method}`);
}

Copy link
Member

Choose a reason for hiding this comment

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

Is this the critical part that causes us to avoid the race? If so, can we have a comment here explaining that?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, sorry. Have added a comment.

@richvdh richvdh added this pull request to the merge queue Dec 4, 2023
@richvdh richvdh removed this pull request from the merge queue due to a manual request Dec 4, 2023
@richvdh richvdh disabled auto-merge December 5, 2023 11:17
@richvdh richvdh merged commit 41878c7 into develop Dec 5, 2023
23 checks passed
@richvdh richvdh deleted the rav/element-r/verif_wait_for_keys_query branch December 5, 2023 11:18
richvdh added a commit to matrix-org/matrix-react-sdk that referenced this pull request Dec 5, 2023
github-merge-queue bot pushed a commit to matrix-org/matrix-react-sdk that referenced this pull request Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Tasks for the team like planning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants