Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

/_matrix/client/r0/profile returns 404 if only displayname is not set #16000

Closed
weeman1337 opened this issue Jul 25, 2023 · 2 comments · Fixed by #16012
Closed

/_matrix/client/r0/profile returns 404 if only displayname is not set #16000

weeman1337 opened this issue Jul 25, 2023 · 2 comments · Fixed by #16012
Labels
A-Profiles Displaynames, avatars O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@weeman1337
Copy link
Contributor

weeman1337 commented Jul 25, 2023

Description

If a user has been created without a displayname, requests are sent to /_matrix/client/r0/profile return a 404 response.

Steps to reproduce

  • Create a user without displayname but an avatar
  • Try to get the profile for the user

Expected: got a response with empty displayname
What happens: 404

Homeserver

matrix.jamesdemo.ems-support-self-serve.element.io

Synapse Version

1.84.0

Installation Method

I don't know

Database

I don't know

Workers

I don't know

Platform

EMS

Configuration

No response

Relevant log output

-

Anything else that would be useful to know?

Link to source

if profileinfo.display_name is None:

@t3chguy
Copy link
Member

t3chguy commented Jul 25, 2023

This almost matches the spec as I read it https://spec.matrix.org/v1.7/client-server-api/#get_matrixclientv3profileuserid

404 There is no profile information for this user or this user does not exist.

Not having a name or avatar set would be "no profile information" - Synapse only checking displayname is wrong though

@clokep
Copy link
Member

clokep commented Jul 25, 2023

I did some quick testing and there are users with a null displayname and a configured avatar, so yeah this seems wrong.

@weeman1337 weeman1337 changed the title /_matrix/client/r0/profile returns 404 if displayname is not set /_matrix/client/r0/profile returns 404 if only displayname is not set Jul 26, 2023
@MatMaul MatMaul added A-Profiles Displaynames, avatars S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Jul 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Profiles Displaynames, avatars O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants