summary refs log tree commit diff
path: root/docs/modules
diff options
context:
space:
mode:
authorreivilibre <oliverw@matrix.org>2021-11-01 15:45:56 +0000
committerGitHub <noreply@github.com>2021-11-01 15:45:56 +0000
commit69ab3dddbc1595ee64c428df7a7f3c861a84b5b0 (patch)
treed765576c98cd2620dfbc87d4c6597c4a34ff5262 /docs/modules
parentRemove deprecated delete room admin API (#11213) (diff)
downloadsynapse-69ab3dddbc1595ee64c428df7a7f3c861a84b5b0.tar.xz
Make `check_event_allowed` module API callback not fail open (accept events) when an exception is raised (#11033)
Diffstat (limited to 'docs/modules')
-rw-r--r--docs/modules/third_party_rules_callbacks.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/modules/third_party_rules_callbacks.md b/docs/modules/third_party_rules_callbacks.md
index a16e272f79..a3a17096a8 100644
--- a/docs/modules/third_party_rules_callbacks.md
+++ b/docs/modules/third_party_rules_callbacks.md
@@ -43,6 +43,14 @@ event with new data by returning the new event's data as a dictionary. In order
 that, it is recommended the module calls `event.get_dict()` to get the current event as a
 dictionary, and modify the returned dictionary accordingly.
 
+If `check_event_allowed` raises an exception, the module is assumed to have failed.
+The event will not be accepted but is not treated as explicitly rejected, either.
+An HTTP request causing the module check will likely result in a 500 Internal
+Server Error.
+
+When the boolean returned by the module is `False`, the event is rejected.
+(Module developers should not use exceptions for rejection.)
+
 Note that replacing the event only works for events sent by local users, not for events
 received over federation.