Skip to content

Ensure more uniqueness for generated HTML IDs #1881

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

Merged
merged 4 commits into from
Jun 20, 2024

Conversation

zecakeh
Copy link
Contributor

@zecakeh zecakeh commented Jun 20, 2024

Given that the IDs are not "uniquified" with JavaScript anymore, we need to make sure the generated IDs are unique.

This solves most cases of duplicate IDs, except for the duplicate endpoints POST /_matrix/client/v3/rooms/{roomId}/invite and GET /_matrix/client/v3/events which will probably need a new solution.

See each commit's message for details.

Pull Request Checklist

Preview: https://pr1881--matrix-spec-previews.netlify.app

@zecakeh zecakeh requested a review from a team as a code owner June 20, 2024 09:25
zecakeh added 4 commits June 20, 2024 11:28
Avoids duplicate IDs for object of endpoints
that use the same path but a different method.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Ensures that the objects have a unique ID compared to other parts of the endpoint.
Mostly useful for the Error type that can be used for responses with different status codes.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@turt2live turt2live merged commit 094e25b into matrix-org:main Jun 20, 2024
12 checks passed
@turt2live turt2live added the release-blocker Blocks the next release from happening label Jun 20, 2024
@zecakeh zecakeh deleted the unique-ids branch June 20, 2024 15:44
@turt2live turt2live mentioned this pull request Jun 20, 2024
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-blocker Blocks the next release from happening
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants