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

Don't handle key verification requests which are immediately cancelled #962

Merged
merged 1 commit into from
Jun 20, 2019

Conversation

turt2live
Copy link
Member

Fixes element-hq/element-web#10083
Fixes element-hq/element-web#9197
Fixes element-hq/element-web#8629

The issue is partially fixed by matrix-org/matrix-react-sdk#3123 in that users would no longer see "Incoming request", but would launch their client to a bunch of "key verification cancelled" dialogs. To work around this, we just don't handle key verification requests which we know are cancelled.

The changes are a bit awkward (flagging the event as cancelled instead of filtering it) because:

  • We probably don't want to prevent events getting sent over the EventEmitter because applications may still rely on them.
  • The cypto side only has visibility of 1 event at a time, so it needs to have some kind of flag to rely on.

An attempt has been made to generalize the new event flag for possible future cases.

Fixes element-hq/element-web#10083
Fixes element-hq/element-web#9197
Fixes element-hq/element-web#8629

The issue is partially fixed by matrix-org/matrix-react-sdk#3123 in that users would no longer see "Incoming request", but would launch their client to a bunch of "key verification cancelled" dialogs. To work around this, we just don't handle key verification requests which we know are cancelled.

The changes are a bit awkward (flagging the event as cancelled instead of filtering it) because:
* We probably don't want to prevent events getting sent over the EventEmitter because applications may still rely on them.
* The cypto side only has visibility of 1 event at a time, so it needs to have some kind of flag to rely on.

An attempt has been made to generalize the new event flag for possible future cases.
@turt2live turt2live requested a review from a team June 19, 2019 22:47
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

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

Slightly annoying that the sync code has to have special handling for verification requests: feels like we the layer above should be emitting events to the client once the whole sync is processed, having de-duped them etc, but that's a general problem with the js-sdk arch.

@turt2live
Copy link
Member Author

feels like we the layer above should be emitting events to the client once the whole sync is processed

Yes, I 100% agree. v2 when? 😇

@turt2live turt2live merged commit 5538575 into develop Jun 20, 2019
@turt2live turt2live deleted the travis/sas-cancel branch June 20, 2019 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants