~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

A group's own site can never be removed from its profile

Closed
Closed chadtmiller.com opened this issue 0 comments

What happened

url is taken through text(), which maps blank to None, and None keeps the current site. The console's profile form sends url: text(form, 'url') || undefined, so someone who empties "Its own site" and saves sees the old site come back. No API call can clear it either: absent, "" and null all keep it. tests/group_config.rs (around line 124) covers "kept when left out" but nothing covers clearing.

How to see it

Read against docs/fresh at 4636e6d, the code at: group_config.rs:208-215 (update_profile); web/src/routes/g/[handle]/settings/+page.server.ts:90. Paths are under crates/group-host/src unless they say otherwise. Severity: medium.

What you expected

Keep the site when url is absent, and clear it when it is given as null or blank, as avatar/banner do with null. Have the console send null for an emptied field.

Where

The host, as built from 4636e6d. Found while checking the docs against the code.