This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Reject device display names that are too long#6882
Merged
Conversation
Member
Author
|
I'm seeing a SyTest fail:
This doesn't feel related to this PR and seems to be failing on develop as well (see https://buildkite.com/matrix-dot-org/synapse/builds/7019). |
Member
|
matrix-org/sytest#801 should have fixed that |
Member
Author
|
👍 I see that those were merged into develop on SyTest. Kicked off the builds again. Thanks @ara4n! |
richvdh
approved these changes
Feb 10, 2020
Member
richvdh
left a comment
There was a problem hiding this comment.
lgtm, though a regression test in tests.handlers.test_device would have won bonus points...
95b37d3 to
520a579
Compare
Member
Author
|
Thanks for the review @richvdh! I added a unit test, although now it seems more builds are failing for unrelated reasons. |
Too long is currently defined as 100 characters in length.
520a579 to
3e10e10
Compare
Member
Author
|
@richvdh Would appreciate a quick check over the unit test to see if it is a reasonable test. Builds are green again too! Thanks! |
babolivier
pushed a commit
that referenced
this pull request
Sep 1, 2021
* commit 'a92e703ab': Reject device display names that are too long (#6882)
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This rejects device display name updates that are too long by raising a
SynapseErrorfrom update device endpoint.This defines a maximum length of 100 characters, but that is arbitrary. If someone has a better suggestion, please let me know!