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.
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
MSC1884: Proposal to replace slashes in event IDs #1884
MSC1884: Proposal to replace slashes in event IDs #1884
Changes from 2 commits
82258fc
207d6cf
9dcf2d6
417f3a3
88f533f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
this point makes me incredibly sad, but I think I can live with it.
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.
It seems like a good idea to broaden the proposal to fix all affected identifiers, rather than doing just the one that has caused the most trouble. What's the reason for not doing so?
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.
like /~https://github.com/matrix-org/matrix-doc/pull/1884/files#diff-423836d994b22ebd6bfac8329976ab5eR70 ? Just that it's a big job.
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.
Specifically: if we were to do so, I think it would be a multi-month project, and until it's done it doesn't really deliver any value. Even when it is done, you still have to remember to URL-encode your parameters.
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.
IMHO, we should either allow slashes in event IDs, or we should commit to disallowing slashes everywhere. We don't have to do it right away, but I think we should at least commit to it, if we're going to disallow slashes in event IDs. However, given that people are already using slashes in their user IDs, that, ahem, pony may have already bolted.
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 mean, there are lots of user IDs that are invalid under the current grammar, so I'm not sure it matters too much.
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.
we have a terrible history of saying that we are going to do things and not following through. I do not believe that even with the best will in the world that the other identifiers will get fixed. There will always be more pressing things to deal with, and meanwhile client developers really need to url-encode their path parameters.
Basically I just don't see what this solution buys us. Matthew says "every client developer is going to trip over and curse us", but critically this doesn't avoid the need to url-encode your path parameters, because of all those other cases. What it means instead is that you are likely to get all the way to releasing your client and having active users discovering edge-cases before you find the problem, rather than finding it during development. I know that if I were a client developer I'd do a lot less cursing if I found a bug myself rather than having to figure out why it's not working for a user.
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.
My rationale is this:
Entirely separately we have the fact that clients should be escaping room IDs and user IDs today - and it's true to say that clients which don't are timebombs waiting for breakage when /dev/ponies comes along. However, I think we should entirely decouple this from the event_id format question, and make it abundantly clear that right now clients MUST escape room & user IDs in URIs (and then relax this in future if/when we switch those IDs to be URI safe).
In other words, today's client developers are empirically not url-encoding each and every thing that goes into their URLs - instead they are only escaping the things they know need encoding (e.g. they escape room aliases, but they don't escape event_ids). So: please don't force them to escape something that shouldn't need to be escaped.
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.
why would you url-encode some parameters and not others? I mean, sure, you could write a client that way, but it sounds like a funny thing to do.
citation needed?
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.
Perhaps, but empirically that's what people are doing.
From quickly flipping through /~https://github.com/matrix-org/matrix-js-sdk/blob/develop/src/base-apis.js, it looks like every HTTP request in the js-sdk manually decides whether it needs to URI escape its parameters or not. As it happens, the implementor was cautious and escaped the event IDs anyway - but i am sure others will not have done so, and being told "well you should have escaped it anyway" will be cold comfort to people asking "why did you break my app when you could have avoided it?"
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.
Again: I'm doubtful that there are many (any?) instances where user-ids and room aliases are correctly encoded but event-ids are not.
it looks very much to me as if every request which uses path parameters uri-encodes them.
Again, it was already broken, and I do not believe that special-casing event ids really fixes that.
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.
Note that it also means 48% of to-come Matrix URIs that strive to be kinda human-readable and more or less easily human-constructible. Consider people trying to copy-paste ids into a URL, e.g.
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.
@KitsuneRal your eg went missing...
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.
It didn't :) Read "E.g., consider people trying..."