mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-12 12:08:18 +00:00
A port of check_state_dependent_auth_rules and auth_types_for_event, with the helpers they use: power level lookups with Python's int() coercion, the membership rules, _check_power_levels, check_redaction and the MSC3757 and MSC4289 rules. Failures come in two kinds. Rejected maps to AuthError, which state resolution skips. Invalid covers what the Python raises as something else (SynapseError(400) from power level validation, ValueError from int(), KeyError from a missing field), which state resolution must not swallow. Third-party invites do the structural checks in Rust and call back into Python for the ed25519 signature check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ULdieJyQoHNzeHq42H2M1p