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

Verification | Unexpected verified badge in DM title bar on the other user avatar #28164

Closed
BillCarsonFr opened this issue Oct 8, 2024 · 4 comments · Fixed by #28407
Closed
Assignees
Labels
A-DM-Start Creating a DM with another user A-E2EE-SAS-Verification O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect

Comments

@BillCarsonFr
Copy link
Member

As a fresh user (eve) I created a DM with Alice.
I then noticed a verified badge on alice

image

I double check on the console, and Alice is not verified:

await mxMatrixClientPeg.get().getCrypto().getUserVerificationStatus("@alice:localhost")

UserVerificationStatus {needsUserApproval: false, crossSigningVerified: false, crossSigningVerifiedBefore: false, tofu: false}

If I refresh the browser tab it is then fixed.
image

Here is more details on the succession of events:
image

Maybe an outdated room shield? and some confusion between user badges and room shields?

@dosubot dosubot bot added A-DM-Start Creating a DM with another user O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect labels Oct 8, 2024
@BillCarsonFr
Copy link
Member Author

Found a similar out-of-date UX problem
Starts with Alice and Eve verified.
Let Eve reset it's identity

I then see the warning
Image

Then reverify Eve from Alice side.
The Room header is out-of-date and still showing the red warning

switch to one room and come back. it is then up to date
Image

@andybalaam
Copy link
Member

Crypto team will put this on our backlog and do a timeboxed investigation of whether this is simple to fix.

@uhoreg
Copy link
Member

uhoreg commented Oct 31, 2024

The icon is handled by components/views/rooms/RoomHeader.tsx, which uses hooks/useEncryptionStatus.tsx to determine which icon to show, which only looks at the status at the time it is called. So, basically, it doesn't update the icon when the user identity changes, until the user switches rooms and switches back, causing it to re-render.

The solution would be to fix hooks/useEncryptionStatus.tsx to subscribe to some events, so that it updates the state when there are identity changes. I guess in this case, we would want to listen for CryptoEvent.UserTrustStatusChanged and RoomStateEvent.Events (to catch room membership changes). It may also involve picking through utils/ShieldUtils.tsx to determine if there are other events that we should listen for.

The icon from the initial comment was probably because the room was verified before Alice was invited/joined, and never got updated when Alice joined.

Probably a size S task.

@uhoreg
Copy link
Member

uhoreg commented Oct 31, 2024

Moving back to Qualification, now that we have an estimate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-DM-Start Creating a DM with another user A-E2EE-SAS-Verification O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants