Reject null profile field values (following an optional clause in the specification), in order to avoid clients accidentally harming interoperability. - #20153
Draft
reivilibre wants to merge 5 commits into
Conversation
reivilibre
force-pushed
the
rei/rej_profile_null
branch
from
August 26, 2026 16:13
e2211f2 to
1a8d4f9
Compare
5 tasks
reivilibre
added a commit
to reivilibre/fork-element-web
that referenced
this pull request
Aug 26, 2026
Null is not interoperable as an allowable field value: > Servers MAY reject null values. — https://spec.matrix.org/v1.19/client-server-api/#put_matrixclientv3profileuseridkeyname Synapse will enforce this to help in element-hq/synapse#20153
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on: matrix-org/complement#914
displaynameandavatar_urlalready did not permit nulls, seemingly from #8223.The specification at v1.15 does not permit
nullfor those fields either, so this seems consistent with historical specification.This only changes behaviour for 'custom' fields.
Add test
This passes for
displaynameandavatar_urlThis fails for the custom field
Reject profile fields with NULL
cosmetic drive-by: Use BAD_REQUEST in neighbours