Skip to content

A Signal group where only admins send is read-only for everyone who is not an admin - #1041

Open
unRekable wants to merge 1 commit into
mainfrom
fix/signal-announcements-only-read-only
Open

unRekable wants to merge 1 commit into
mainfrom
fix/signal-announcements-only-read-only

Conversation

@unRekable

Copy link
Copy Markdown
Collaborator

What changed and why

A Signal group where only admins send must be read-only for everyone else. chatd never knew which groups those are: libsignal's decrypted group says so, but the library this tree reads groups through drops the field when it stores them, so every group was told as open to everyone (#723). The adapter now keeps what libsignal decrypted, with the flag, and reads a group once more per connection when the stored copy does not say. Being taken out and added back leaves the row read-only until the member is made an admin.

Type

  • feature
  • fix
  • perf
  • refactor
  • chore
  • docs

Platforms

  • windows
  • macos
  • linux
  • android
  • ios

Proof

Scenario: e2e/scenarios/signal-announcements-only

The scenario starts this build's chatd on Signal's scripted wire, steers it the way crates/chatd/tests/signal.rs does, and speaks chatd's socket. A member who is not an admin gets a read-only row that says "Only admins can send messages", a send is refused in those words, and being taken out and added back leaves the row read-only until they are made an admin. A build from before the change opens the composer again when the member is added back, so this driver fails there.

Lab run: not made. The driver was not run against the real chatd on a lab host. The reading from the Groups service is on no wire: presage has no stand-in for it, so that path was read, not run.

Also run on this branch on Windows before this pull request: cargo build --workspace --all-targets --features tinyclient/gui, then cargo nextest run --workspace --features tinyclient/gui (3682 passed, 28 skipped; among them the new scripted-wire test and three new unit tests), then cargo test --workspace --doc --features tinyclient/gui.

Compatibility

No protocol change. A stored group in the Signal vault grows by one field, announcements_only, written only when it is known for the stored revision and read as absent otherwise.

Risk and rollback

One more request to the Groups service per connection for a group whose send rule is not known yet. It is asked once a connection, so a group Signal will not answer for costs no request on every message. Until it is read, the group is told as open to everyone, as before. Revert the commit; the extra field in stored groups can stay.

Release note

A Signal group where only admins send is read-only for everyone who is not an admin.

Part of #723.

…s not an admin, also after they are added back
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.

1 participant