@@ -87,10 +87,6 @@ already. This API just makes this more convenient.
87
87
` allowed_room_ids ` is already part of the federation ` hierarchy ` API and
88
88
necessary for distinguishing possible join modes for ` knock_restricted ` rooms.
89
89
90
- This API should be accessible to guest users (as it is already accessible
91
- without authentication). If the room is not allowed to be previewed,
92
- 403/` M_FORBIDDEN ` should be returned.
93
-
94
90
95
91
#### Rationale and description of response fields
96
92
@@ -112,7 +108,20 @@ without authentication). If the room is not allowed to be previewed,
112
108
113
109
It should be possible to call this API without authentication, but servers may
114
110
rate limit how often they fetch information over federation more heavily, if the
115
- user is unauthenticated.
111
+ user is unauthenticated. Being able to call this API unauthenticated is
112
+ beneficial to avoid third parties registering guest users for one-shot API
113
+ calls. Restricting this API to guests only would provide no security benefit.
114
+
115
+ This API should be accessible to guest users (as it is already accessible
116
+ without authentication).
117
+
118
+ If the room is not allowed to be previewed, 403/` M_FORBIDDEN ` should be
119
+ returned. If the room can't be found, ` M_NOT_FOUND ` should be returned. A
120
+ server might return additional error codes based on if a room was blocked, the
121
+ ` roomIdOrAlias ` is malformed or other implementation specific error cases. The
122
+ server should NOT return ` M_UNAUTHORIZED ` or otherwise divulge existance of a
123
+ room, that requires authentication to preview, if the request is
124
+ unauthenticated or authenticated by a user without access to the room.
116
125
117
126
(1) The field ` membership ` will not be present when called unauthenticated, but
118
127
is required when called authenticated. It should be ` leave ` if the server
0 commit comments