Server ACL settings treat a missing allow_ip_literals as false, so the first save silently blocks IP-literal servers #261

Closed
opened 2026-10-04 17:41:25 -04:00 by jared · 0 comments
Owner

What happens
Room Settings → Server ACL shows "Allow IP literal addresses" unchecked for any room with no m.room.server_acl event, or with one that omits the field. The first time an admin saves any change (for example, adding a deny entry), the page writes allow_ip_literals: false and IP-literal servers are banned from the room without anyone choosing that.

The spec says allow_ip_literals defaults to true when absent.

Where

  • DEFAULT_ACL.allow_ip_literals: false (src/app/features/room-settings/RoomServerACL.tsx:46-50).
  • currentAcl.allow_ip_literals ?? false in both the initial state and isDirty (RoomServerACL.tsx:194, 201).

Also

  • The Checkbox is controlled with checked plus onClick (RoomServerACL.tsx:337). React logs "You provided a checked prop to a form field without an onChange handler".

Fix

  • Default to true (?? true, and DEFAULT_ACL.allow_ip_literals: true).
  • Optionally show "(default)" when the field is absent.

More context

Introduced by 51a355fe (2026-06-03, the Server ACL editor).

Spec: m.room.server_acl: allow_ip_literals ("True to allow server names that are IP address literals. False to deny. Defaults to true if missing.")

Who: room admins using Room Settings → Server ACL; the result hits every server talking to the room. Moderation bots and Element write the field explicitly, so the trigger is a room whose first ACL is set from Lotus, or an ACL that omits the field.

Manual repro

  1. Open a room with no ACL → Room Settings → Server ACL. "Allow IP literal addresses" shows unchecked.
  2. Add badserver.example to Denied and Save.
  3. Actual: the stored event has allow_ip_literals: false. Expected: true unless the admin unticks it.

Acceptance criteria: absent field displays as allowed; saving without touching the box preserves true; unit test for the default.


Found in the October 2026 client audit (Playwright against a local Synapse + LiveKit stack, plus code reading). Code refs are at cinny 30e2dbcd, cinny-desktop 8f67ec7, element-call 3b0050e8.

**What happens** Room Settings → **Server ACL** shows **"Allow IP literal addresses" unchecked** for any room with no `m.room.server_acl` event, or with one that omits the field. The first time an admin saves any change (for example, adding a deny entry), the page writes `allow_ip_literals: false` and IP-literal servers are banned from the room without anyone choosing that. The spec says `allow_ip_literals` **defaults to `true`** when absent. **Where** - `DEFAULT_ACL.allow_ip_literals: false` (src/app/features/room-settings/RoomServerACL.tsx:46-50). - `currentAcl.allow_ip_literals ?? false` in both the initial state and `isDirty` (RoomServerACL.tsx:194, 201). **Also** - The `Checkbox` is controlled with `checked` plus `onClick` (RoomServerACL.tsx:337). React logs "You provided a `checked` prop to a form field without an `onChange` handler". **Fix** - Default to `true` (`?? true`, and `DEFAULT_ACL.allow_ip_literals: true`). - Optionally show "(default)" when the field is absent. ### More context **Introduced by** 51a355fe (2026-06-03, the Server ACL editor). **Spec:** [`m.room.server_acl`](https://spec.matrix.org/v1.12/client-server-api/#mroomserver_acl): `allow_ip_literals` ("True to allow server names that are IP address literals. False to deny. **Defaults to true if missing**.") **Who:** room admins using Room Settings → Server ACL; the result hits every server talking to the room. Moderation bots and Element write the field explicitly, so the trigger is a room whose first ACL is set from Lotus, or an ACL that omits the field. **Manual repro** 1. Open a room with no ACL → Room Settings → Server ACL. "Allow IP literal addresses" shows **unchecked**. 2. Add `badserver.example` to Denied and Save. 3. **Actual:** the stored event has `allow_ip_literals: false`. **Expected:** `true` unless the admin unticks it. **Acceptance criteria:** absent field displays as allowed; saving without touching the box preserves `true`; unit test for the default. --- _Found in the October 2026 client audit (Playwright against a local Synapse + LiveKit stack, plus code reading). Code refs are at cinny `30e2dbcd`, cinny-desktop `8f67ec7`, element-call `3b0050e8`._
jared added the bugpriority: mediumarea: moderation labels 2026-10-04 17:41:25 -04:00
jared closed this issue 2026-10-19 14:21:18 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#261