Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSC4170: 403 error responses for profile APIs #1867

Merged
merged 6 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelogs/client_server/newsfragments/1867.clarification
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add missing 403 response on `/profile/{userId}/avatar_url` and `/profile/{userId}/displayname`.
1 change: 1 addition & 0 deletions changelogs/server_server/newsfragments/1867.clarification
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add missing 403 response on `/query/profile`.
28 changes: 28 additions & 0 deletions data/api/client-server/profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,20 @@ paths:
value: {
"displayname": "Alice Margatroid"
}
"403":
x-addedInMatrixVersion: "1.2"
Johennes marked this conversation as resolved.
Show resolved Hide resolved
description: The server is unwilling to disclose whether the user exists and/or
has a display name.
content:
application/json:
schema:
$ref: definitions/errors/error.yaml
examples:
response:
value: {
"errcode": "M_FORBIDDEN",
"error": "Profile lookup over federation is disabled on this homeserver"
}
"404":
description: There is no display name for this user or this user does not exist.
tags:
Expand Down Expand Up @@ -185,6 +199,20 @@ paths:
value: {
"avatar_url": "mxc://matrix.org/SDGdghriugerRg"
}
"403":
x-addedInMatrixVersion: "1.2"
description: The server is unwilling to disclose whether the user exists and/or
has an avatar URL.
content:
application/json:
schema:
$ref: definitions/errors/error.yaml
examples:
response:
value: {
"errcode": "M_FORBIDDEN",
"error": "Profile lookup over federation is disabled on this homeserver"
}
"404":
description: There is no avatar URL for this user or this user does not exist.
tags:
Expand Down
14 changes: 14 additions & 0 deletions data/api/server-server/query.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,20 @@ paths:
"displayname": "John Doe",
"avatar_url": "mxc://matrix.org/MyC00lAvatar"
}
"403":
x-addedInMatrixVersion: "1.2"
description: The server is unwilling to disclose whether the user exists and/or
has a display name.
content:
application/json:
schema:
$ref: ../client-server/definitions/errors/error.yaml
examples:
response:
value: {
"errcode": "M_FORBIDDEN",
"error": "Profile lookup over federation is disabled on this homeserver"
}
Johennes marked this conversation as resolved.
Show resolved Hide resolved
"404":
description: The user does not exist or does not have a profile.
content:
Expand Down