-
Notifications
You must be signed in to change notification settings - Fork 60
Add tests for allowed symbols in user identifiers #983
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
Conversation
https://matrix.org/docs/spec/appendices#user-identifiers Signed-off-by: Bohdan Horbeshko <bodqhrohro@gmail.com>
Signed-off-by: Bohdan Horbeshko <bodqhrohro@gmail.com>
|
Hi, sorry its taken a while to get back to you! It's great to see people diving into SyTest 🙂 I've been trying to think if this is something that we want in SyTest, namely there is nothing in the spec that requires servers to accept these characters in names (indeed, synapse will refuse to allow you to register usernames starting with a number or underscore). On the other hand, it is somewhat useful to test whether a server accepts the full range of characters in usernames or not. I guess ideally we'd somehow mark this test as "informational, but not required for spec compliance", we do have a bunch of tests already that sort of ish fit into similar categories (mainly Synapse specific tests), but I don't think we currently have a way of actually marking tests. I think I am probably mildly in favour of merging this PR, and if other server implementations run into issues we can cross that bridge down the line. I'll wait a bit before merging in case anyone else has opinions. |
|
it's also worth noting that there is nothing that requires the username passed to We should probably at least have a comment on the test to say that it's making assumptions about the server implementation? |
Uh oh, I missed that point. Does it mean that the tests for rejected characters (which I based these tests on) are making this assumption too? Can a home server, for example, automatically escape the prohibited characters in MXID instead of returning |
yes, indeed they are.
yes. but as erik says: we don't have a great way of testing this stuff otherwise, and given that all the server implementations we know about handle these scenarios in the way sytest assumes, it's probably ok - but I do think that we should include comments in the tests where we are making new assumptions about implementation. |
So the Then I guess it should be split into two arguments: one for strictly implementation-specific tests, and one for behaviour-specific tests, which may be used for HS that strive to mimick the behaviour of other HS beyond the specification. So it would become possible to run something like Should I post a separate issue about it and mark the tests with |
I'm not sure, to be honest. That sounds a bit overcomplicated to me, and I don't think it's a big enough problem to make that worthwhile. |
richvdh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest you just add a comment like this
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This reverts commit 90459c3.
|
Thanks. I'm pretty sure the CI is failing for unrelated reasons, so I'm going to go ahead and merge this |
https://matrix.org/docs/spec/appendices#user-identifiers
Signed-off-by: Bohdan Horbeshko bodqhrohro@gmail.com