applyLabel/negateLabel take any non-empty val, any string as rule, and any string as a strongRef's cid, and write them into an fyi.opensocial.label record in the group's space. A 10 000-byte val, "rule": "not a uri", or "cid": "x" with a URI in the group's space is accepted and published, though label.json says val is at most 128, rule is an at-uri, and cid a CID: a reader that validates the record rejects it. The test itself sends "rule": "at://x/y/z" (tests/moderation.rs:159), whose authority x is neither a DID nor a handle. resolveSubject keeps a note of any length in the queue, against the lexicon's 3000 bytes / 300 graphemes. Only moderators holding label/mod.resolve can do this.
How to see it
Read against docs/fresh at 4636e6d, the code at: crates/group-host/src/moderation.rs:239-240 (val), 267-269 (rule), 205-213 (subject.cid), 448 (note). Paths are under crates/group-host/src unless they say otherwise. Severity: low.
What you expected
Refuse InvalidRequest for a val over 128 bytes, a rule that is not an at-uri (syntax has the checks), a cid that does not parse, and a note over 3000 bytes or 300 graphemes; add the cases to the refusals test at tests/moderation.rs:230-260.
Where
The host, as built from 4636e6d. Found while checking the docs against the code.
What happened
applyLabel/negateLabeltake any non-emptyval, any string asrule, and any string as a strongRef'scid, and write them into anfyi.opensocial.labelrecord in the group's space. A 10 000-byteval,"rule": "not a uri", or"cid": "x"with a URI in the group's space is accepted and published, thoughlabel.jsonsaysvalis at most 128,ruleis an at-uri, andcida CID: a reader that validates the record rejects it. The test itself sends"rule": "at://x/y/z"(tests/moderation.rs:159), whose authorityxis neither a DID nor a handle.resolveSubjectkeeps anoteof any length in the queue, against the lexicon's 3000 bytes / 300 graphemes. Only moderators holdinglabel/mod.resolvecan do this.How to see it
Read against
docs/freshat 4636e6d, the code at: crates/group-host/src/moderation.rs:239-240 (val), 267-269 (rule), 205-213 (subject.cid), 448 (note). Paths are undercrates/group-host/srcunless they say otherwise. Severity: low.What you expected
Refuse
InvalidRequestfor avalover 128 bytes, arulethat is not an at-uri (syntaxhas the checks), acidthat does not parse, and anoteover 3000 bytes or 300 graphemes; add the cases to the refusals test at tests/moderation.rs:230-260.Where
The host, as built from 4636e6d. Found while checking the docs against the code.