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

putRule keys a rule by any record key, though rules are keyed by TID

Closed
Closed chadtmiller.com opened this issue 0 comments

What happened

any non-blank rkey that is a valid record key is accepted, and an rkey no rule has yet makes a new rule under that key. For example, rkey: "self" writes fyi.opensocial.rule/self in meta. The tests rely on this too (rkey: "a", tests/groups.rs:399). A consumer that checks rule.json rejects such a record.

How to see it

Read against docs/fresh at 4636e6d, the code at: group_config.rs:294-301 (put_rule); lexicons rule.json:7 ("key": "tid"), putRule.json:19-21. Paths are under crates/group-host/src unless they say otherwise. Severity: low.

What you expected

Either refuse a given rkey that is not an existing rule's key (new rules always get a TID), or change rule.json's key to any.

Where

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