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

Clean room shield update logic #8507

Merged
merged 2 commits into from
Jun 13, 2023

Conversation

BillCarsonFr
Copy link
Member

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Cleaned a bit the room shield update logic, as some issues are reported against outdated shields.

The logic is cleaned so that shields are updated:

  • When a change of devices/keys/signeture of one of the member is detected (DeviceListManager for kotlin / OutgoingRequestsProcessor for rust
  • When a membership change is detected on the room (or encryption has been set)

Rust code was missing the update on membership changes.
The kotlin code seems to be subject to some races while accessing realm in a multithreaded context.

Added some integration test to check the different updates RoomShieldTest

Should fix #8308 but main focus is to have the rust flavor working correctly.

Motivation and context

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@BillCarsonFr BillCarsonFr requested a review from bmarty June 7, 2023 17:30
@BillCarsonFr BillCarsonFr force-pushed the feature/bca/clean_room_shield_update branch from 67f8e3f to 02eb216 Compare June 8, 2023 15:10
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

LGTM, hard to see if there is a bug though :/

@BillCarsonFr BillCarsonFr force-pushed the feature/bca/clean_room_shield_update branch from 02eb216 to 1d651db Compare June 12, 2023 09:40
@sonarcloud
Copy link

sonarcloud bot commented Jun 13, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@BillCarsonFr BillCarsonFr merged commit ce80d7f into develop Jun 13, 2023
@BillCarsonFr BillCarsonFr deleted the feature/bca/clean_room_shield_update branch June 13, 2023 10:27
@yncyrydybyl
Copy link
Member

This is fixing PSB-263 as well.

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.

A red shield is displayed on a user whereas all their sessions are verified
3 participants