aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-09-15Move pseudoID ClientEvent hotswapping to a common location (#3199)devonh
Fixes a variety of issues where clients were receiving pseudoIDs in places that should be userIDs. This change makes pseudoIDs work with sliding sync & element x. --------- Co-authored-by: Till <2353100+S7evinK@users.noreply.github.com>
2023-09-15Update gmsl to use new validated RoomID on PDUs (#3200)devonh
GMSL returns a `spec.RoomID` when calling `PDU.RoomID()`
2023-09-12[pseudoIDs] changing event ID fix (#3195)Sam Wedgwood
power levels events in pseudo IDs sometimes changed event IDs (this was already fixed earlier, but one of the edgecases was not covered, and is now covered) Signed-off-by: `Sam Wedgwood <sam@wedgwood.dev>`
2023-09-12Fix `user_id` query param breaking auth for non-appservices (#3196)Tulir Asokan
The `user_id` query param only has defined behavior when authenticating with an `as_token`. For any other tokens, the presence of the parameter should simply be ignored. Fixes #1738 Signed-off-by: Tulir Asokan <tulir@maunium.net> Co-authored-by: devonh <devon.dmytro@gmail.com>
2023-09-08bump GMSL back to main (#3197)Sam Wedgwood
In a [previous PR](https://github.com/matrix-org/dendrite/pull/3181) I accidentally left GMSL on a dev branch, this PR fixes it by bringing it back to the main branch of GMSL Signed-off-by: `Sam Wedgwood <sam@wedgwood.dev>`
2023-08-31Handle event_format federation in /sync responses (#3192)devonh
2023-08-30Fix Complement scheduled CITill Faelligen
[skip CI]
2023-08-29[helm] Update Ingress hosts to account for IPv6 (server+client) and scheme ↵helm-dendrite-0.13.3Omar Pakker
(client) (#3182) This updates the matchers for deriving the host values from the dendrite config. The original version turned out to have 2 complications: - It did not support IPv6 addresses as host value - It failed for `well_known_client_host` which is a (base) URL instead of a hostname+port. I've verified `well_known_server_name` with ``` dendrite.example.net:443 dendrite.example.net 192.168.1.1 192.168.1.1:1324 [dead::beef]:1234 [dead::beef] [ffff:dead::beef] ``` and `well_known_client_name` with: ``` https://dendrite.example.net:443 https://dendrite.example.net https://dendrite.example.net/ http://dendrite.example.net:8080/ http://192.168.1.1 http://192.168.1.1:8080/ http://[dead::beef]:1234 http://[dead::beef]/ http://[ffff:dead::beef] ``` Fixes #3175 ### Pull Request Checklist <!-- Please read https://matrix-org.github.io/dendrite/development/contributing before submitting your pull request --> * [x] I have added Go unit tests or [Complement integration tests](https://github.com/matrix-org/complement) for this PR _or_ I have justified why this PR doesn't need tests * [x] Pull request includes a [sign off below using a legally identifiable name](https://matrix-org.github.io/dendrite/development/contributing#sign-off) _or_ I have already signed off privately Signed-off-by: `Omar Pakker <Omar007@users.noreply.github.com>` --------- Signed-off-by: Omar Pakker <Omar007@users.noreply.github.com> [skip CI]
2023-08-28Fix CI, upgrade image used for upgrade tests (#3151)Till
2023-08-28Bump commonmarker from 0.23.9 to 0.23.10 in /docs (#3172)dependabot[bot]
Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.9 to 0.23.10. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/gjtorikian/commonmarker/releases">commonmarker's releases</a>.</em></p> <blockquote> <h2>v0.23.10</h2> <h2>What's Changed</h2> <ul> <li>Update to 0.29.0.gfm.13 by <a href="https://github.com/anticomputer"><code>@​anticomputer</code></a> in <a href="https://redirect.github.com/gjtorikian/commonmarker/pull/247">gjtorikian/commonmarker#247</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/gjtorikian/commonmarker/compare/v0.23.9...v0.23.10">https://github.com/gjtorikian/commonmarker/compare/v0.23.9...v0.23.10</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/gjtorikian/commonmarker/blob/v0.23.10/CHANGELOG.md">commonmarker's changelog</a>.</em></p> <blockquote> <h2>[v0.23.10] (2023-07-31)</h2> <ul> <li>Update GFM release to <a href="https://github.com/github/cmark-gfm/releases/tag/0.29.0.gfm.12"><code>0.29.0.gfm.12</code></a> and <a href="https://github.com/github/cmark-gfm/releases/tag/0.29.0.gfm.13"><code>0.29.0.gfm.13</code></a>, thereby <a href="https://github.com/github/cmark-gfm/security/advisories/GHSA-w4qg-3vf7-m9x5">fixing a polynomial time complexity security vulnerability</a>.</li> <li>Of note to users of this library, GFM releases <code>0.29.0.gfm.12</code> and <code>0.29.0.gfm.13</code> also: <ul> <li>Normalized marker row vs. delimiter row nomenclature (<a href="https://redirect.github.com/github/cmark-gfm/pull/273">#273</a>)</li> <li>Exposed CMARK_NODE_FOOTNOTE_DEFINITION literal value (<a href="https://redirect.github.com/github/cmark-gfm/pull/336">#336</a>)</li> </ul> </li> </ul> <h2><a href="https://github.com/gjtorikian/commonmarker/tree/v0.23.4">v0.23.4</a> (2022-03-03)</h2> <p><a href="https://github.com/gjtorikian/commonmarker/compare/v0.23.2...v0.23.4">Full Changelog</a></p> <p><strong>Fixed bugs:</strong></p> <ul> <li><code>#render_html</code> way slower than <code>#render_doc.to_html</code> <a href="https://redirect.github.com/gjtorikian/commonmarker/issues/141">#141</a></li> </ul> <p><strong>Closed issues:</strong></p> <ul> <li>allow keeping text content of unknown tags <a href="https://redirect.github.com/gjtorikian/commonmarker/issues/169">#169</a></li> <li>STRIKETHROUGH_DOUBLE_TILDE not working <a href="https://redirect.github.com/gjtorikian/commonmarker/issues/168">#168</a></li> <li>Allow disabling 4-space code blocks <a href="https://redirect.github.com/gjtorikian/commonmarker/issues/167">#167</a></li> <li>tables with escaped pipes are not recognized <a href="https://redirect.github.com/gjtorikian/commonmarker/issues/166">#166</a></li> </ul> <p><strong>Merged pull requests:</strong></p> <ul> <li>CI: Drop a duplicate 'bundle install' <a href="https://redirect.github.com/gjtorikian/commonmarker/pull/173">#173</a> (<a href="https://github.com/olleolleolle">olleolleolle</a>)</li> <li>CI: Drop duplicate bundle install <a href="https://redirect.github.com/gjtorikian/commonmarker/pull/172">#172</a> (<a href="https://github.com/olleolleolle">olleolleolle</a>)</li> <li>Fixup benchmark and speedup a little, fixes <a href="https://redirect.github.com/gjtorikian/commonmarker/issues/141">#141</a> <a href="https://redirect.github.com/gjtorikian/commonmarker/pull/171">#171</a> (<a href="https://github.com/ojab">ojab</a>)</li> </ul> <h2><a href="https://github.com/gjtorikian/commonmarker/tree/v0.23.2">v0.23.2</a> (2021-09-17)</h2> <p><a href="https://github.com/gjtorikian/commonmarker/compare/v0.23.1...v0.23.2">Full Changelog</a></p> <p><strong>Merged pull requests:</strong></p> <ul> <li>Update GFM release to <code>0.29.0.gfm.2</code> <a href="https://redirect.github.com/gjtorikian/commonmarker/pull/148">#148</a> (<a href="https://github.com/phillmv">phillmv</a>)</li> </ul> <h2><a href="https://github.com/gjtorikian/commonmarker/tree/v0.23.1">v0.23.1</a> (2021-09-03)</h2> <p><a href="https://github.com/gjtorikian/commonmarker/compare/v0.23.0...v0.23.1">Full Changelog</a></p> <p><strong>Closed issues:</strong></p> <ul> <li>Incorrect processing of list and next block of code <a href="https://redirect.github.com/gjtorikian/commonmarker/issues/146">#146</a></li> </ul> <p><strong>Merged pull requests:</strong></p> <ul> <li>Normalize parse and render options <a href="https://redirect.github.com/gjtorikian/commonmarker/pull/145">#145</a> (<a href="https://github.com/phillmv">phillmv</a>)</li> </ul> <h2><a href="https://github.com/gjtorikian/commonmarker/tree/v0.23.0">v0.23.0</a> (2021-08-30)</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/gjtorikian/commonmarker/commit/db8cd377b54541f7fd484d168b7682a282a680f7"><code>db8cd37</code></a> Merge pull request <a href="https://redirect.github.com/gjtorikian/commonmarker/issues/247">#247</a> from anticomputer/update-to-0.29.0.gfm.13</li> <li><a href="https://github.com/gjtorikian/commonmarker/commit/e1e450c381e1fac5021a08bdc5f72bbac9cf6038"><code>e1e450c</code></a> :gem: release 0.23.10</li> <li><a href="https://github.com/gjtorikian/commonmarker/commit/08b7c4b96c2835edcc2f14e978f758f6ac58b158"><code>08b7c4b</code></a> Update cmark-upstream to <a href="https://github.com/github/cmark-gfm/commit/587a12bb5">https://github.com/github/cmark-gfm/commit/587a12bb5</a>...</li> <li><a href="https://github.com/gjtorikian/commonmarker/commit/d0e81e2392861ad3f6f27e895080cdfc6a8e72e7"><code>d0e81e2</code></a> I've used this version of the update_submodules script for several releases, ...</li> <li>See full diff in <a href="https://github.com/gjtorikian/commonmarker/compare/v0.23.9...v0.23.10">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=commonmarker&package-manager=bundler&previous-version=0.23.9&new-version=0.23.10)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/matrix-org/dendrite/network/alerts). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> [skip ci]
2023-08-24Add configuration option for sliding sync when hosting ↵devonh
/.well-known/matrix/client (#3189) Adds the `org.matrix.msc3575.proxy` field (used for configuring sliding sync) to /.well-known/matrix/client when Dendrite is serving that endpoint and `well_known_sliding_sync_proxy` has been configured. ie. Config values of: ``` yaml global: well_known_client_name: https://example.com well_known_sliding_sync_proxy: https://syncv3.example.com ``` results in a /.well-known/matrix/client of: ``` json { "m.homeserver": { "base_url": "https://example.com" }, "org.matrix.msc3575.proxy": { "url": "https://syncv3.example.com" } } ``` If `well_known_sliding_sync_proxy` is not provided, the json provided by /.well-known/matrix/client does not include the proxy field. ie. ``` json { "m.homeserver": { "base_url": "https://example.com" } } ```
2023-08-24[pseudoIDs] More pseudo ID fixes - Part 2 (#3181)Sam Wedgwood
Fixes include: - Translating state keys that contain user IDs to their respective room keys for both querying and sending state events - **NOTE**: there may be design discussion needed on what should happen when sender keys cannot be found for users - A simple fix for kicking guests from rooms properly - Logic for boundary history visibilities was slightly off (I'm surprised this only manifested in pseudo ID room versions) Signed-off-by: `Sam Wedgwood <sam@wedgwood.dev>`
2023-08-23Bump pinecone docker go versionDevon Hudson
2023-08-23Bump helm chart versionhelm-dendrite-0.13.2Till Faelligen
2023-08-23Version 0.13.2 (#3187)v0.13.2Till
2023-08-15[pseudoID] More pseudo ID fixes (#3167)Sam Wedgwood
Signed-off-by: `Sam Wedgwood <sam@wedgwood.dev>`
2023-08-11Update pinecone to use new quic version (#3174)devonh
2023-08-08Add config key for default room version (#3171)Sam Wedgwood
This PR adds a config key `room_server.default_config_key` to set the default room version for the room server. Signed-off-by: `Sam Wedgwood <sam@wedgwood.dev>`
2023-08-03Add ID in error messages for ApplicationServices (#3162)maxberger
This is to easier identify which service caused the error. Feature is just improving logging, thus no tests added. ### Pull Request Checklist <!-- Please read https://matrix-org.github.io/dendrite/development/contributing before submitting your pull request --> * [X] I have justified why this PR doesn't need tests * [X] Pull request includes a [sign off below using a legally identifiable name](https://matrix-org.github.io/dendrite/development/contributing#sign-off) _or_ I have already signed off privately Signed-off-by: `Maximilian Berger <max@berger.name>` Co-authored-by: Till <2353100+S7evinK@users.noreply.github.com>
2023-08-02Use `*spec.SenderID` for `QuerySenderIDForUser` (#3164)Sam Wedgwood
There are cases where a dendrite instance is unaware of a pseudo ID for a user, the user is not a member of that room. To represent this case, we currently use the 'zero' value, which is often not checked and so causes errors later down the line. To make this case more explict, and to be consistent with `QueryUserIDForSender`, this PR changes this to use a pointer (and `nil` to mean no sender ID). Signed-off-by: `Sam Wedgwood <sam@wedgwood.dev>`
2023-07-31[pseudoIDs] Fixes for room alias tests (#3159)Sam Wedgwood
Some (deceptively) simple fixes for some bugs that caused room alias tests to fail (sytext `tests/30rooms/05aliases.pl`). Each commit has details about what it fixes. Sytest results: - Sytest before (79d4a0e): https://gist.github.com/swedgwood/972ac4ef93edd130d3db0930703d6c82 - Sytest after (4b09bed): https://gist.github.com/swedgwood/504b00ac4ee892acb757b7fac55fa28a Room aliases go from `8/15` to `15/15`, but looks like these fixes also managed to fix about `4` other tests, which is a nice bonus :) Signed-off-by: `Sam Wedgwood <sam@wedgwood.dev>`
2023-07-28Send a more generic error message to clients if the file can't be found (#3161)Till
Fixes #3160
2023-07-26Restore old behaviour of PurgeRoomTill Faelligen
2023-07-26add deployment strategy option to helm chart (re #3021) (#3155)George Antoniadis
@S7evinK sorry for the spam but any chance we get get this merged into main at some point? It was previously merged in https://github.com/matrix-org/dendrite/pull/3021 into a temp branch that never made it into main. If there is an issue with this being merged let me know. --- Minor update to the helm chart to allow setting the update strategy as the default `RollingUpdate` one is a bit annoying if using `ReadWriteOnce` volumes for media. Hope this makes sense. --- ### Pull Request Checklist <!-- Please read https://matrix-org.github.io/dendrite/development/contributing before submitting your pull request --> * [x] ~~I have added Go unit tests or [Complement integration tests](https://github.com/matrix-org/complement) for this PR _or_ I have justified why this PR doesn't need tests~~ Haven't touched any go files. * [x] Pull request includes a [sign off below using a legally identifiable name](https://matrix-org.github.io/dendrite/development/contributing#sign-off) _or_ I have already signed off privately Signed-off-by: `George Antoniadis <george@noodles.gr>` [skip ci]
2023-07-21Don't quit if unknown msc in config, log it and keep goingDevon Hudson
2023-07-21Fix event federation with pseudoID rooms (#3156)devonh
2023-07-21Update ConnectionManager to still allow component defined connections (#3154)Till
2023-07-20de-MSC-ifying space summaries (MSC2946) (#3134)helm-dendrite-0.13.1Sam Wedgwood
- This PR moves and refactors the [code](https://github.com/matrix-org/dendrite/blob/main/setup/mscs/msc2946/msc2946.go) for [MSC2946](https://github.com/matrix-org/matrix-spec-proposals/pull/2946) ('Space Summaries') to integrate it into the rest of the codebase. - Means space summaries are no longer hidden behind an MSC flag - Solves #3096 Signed-off-by: Sam Wedgwood <sam@wedgwood.dev>
2023-07-19Use pointer when passing the connection manager around (#3152)Till
As otherwise existing connections aren't reused.
2023-07-18Extend context timeout on send_join to allow for joining complex rooms (#3153)devonh
Background federated joins are currently broken since they timeout after 30s. This timeout didn't exist before the refactor. It should still exist but it needs to be extended to allow for the additional time it can take a server to generate the /send_join response when joining a complex room.
2023-07-14Don't HTTP500 if a profile does't existTill Faelligen
2023-07-14Discard "illegal base64 data at input byte 0" errors in the SyncAPITill Faelligen
2023-07-14Avoid panic due to being unable to query the userIDTill Faelligen
2023-07-13Optimise getting local members and membership counts (#3150)Till
The previous version was getting **ALL** membership events (as `ClientEvents`, so going through `NewEventFromTrustedJSONWithID`) for a given room. Now we are querying only locally joined users as `ClientEvents`, which should **significantly** reduce allocations. Take for example a large room with 2k membership events, but only 1 local user - avoiding 1999 `NewEventFromTrustedJSONWithID` calls just to calculate the `roomSize` which we can also query by other means. This is also getting called for every `OutputRoomEvent` in the userAPI. Benchmark with 1 local user and 100 remote users. ``` pkg: github.com/matrix-org/dendrite/userapi/consumers cpu: 12th Gen Intel(R) Core(TM) i5-12500H │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ LocalRoomMembers-16 375.9µ ± 7% 327.6µ ± 6% -12.85% (p=0.000 n=10) │ old.txt │ new.txt │ │ B/op │ B/op vs base │ LocalRoomMembers-16 79.426Ki ± 0% 8.507Ki ± 0% -89.29% (p=0.000 n=10) │ old.txt │ new.txt │ │ allocs/op │ allocs/op vs base │ LocalRoomMembers-16 1015.0 ± 0% 277.0 ± 0% -72.71% (p=0.000 n=10) ```
2023-07-13Tweaks around `/messages` (#3149)Till
Try to mitigate some issues with `/messages`
2023-07-13Update NATS again [skip ci]Till Faelligen
2023-07-11Add revision to version string (#3147)Till
Since the removal of `build.sh`, we don't include any information about the revision Dendrite was build from. Since go1.18, the revision a binary was build from is automatically included, so we can try to get that instead. This also adds a `dendrite_up` metric showing the current version (`dendrite_up{version="0.13.1+c796f20"} 1`) Closes #2993
2023-07-08Avoid loops by setting end to an empty string if start == end (#3146)Till
2023-07-07Unknown issueTill Faelligen
2023-07-07[NATS] Issue identified and fixed applied, workaround known.Till Faelligen
2023-07-07Fix issues reported by Sentry (#3143)Till
This should fix a few issues reported by Sentry
2023-07-07Add event size checks similar to Synapse (#3140)Till
Companion to https://github.com/matrix-org/gomatrixserverlib/pull/400 This tries to mimic the logic found in Synapse, as dropping events can break rooms (and we may end up in endless loops..)
2023-07-07Set max age for roomserver input stream to avoid excessive interior deletes ↵Neil
(#3145) If old messages build up in the input stream and do not get processed successfully, this can create a significant drift between the stream first sequence and the consumer ack floors, which results in a slow and expensive start-up when interest-based retention is in use. If a message is sat in the stream for 24 hours, it's probably not going to get processed successfully, so let NATS drop them instead. Dendrite can reconcile by fetching missing events later if it needs to. --------- Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2023-07-07Prepare statement on an existing transaction (#3144)Till
This should fix an issue with the database being locked for SQLite.
2023-07-06Populate syncapi state event prev_sender with userID (#3142)devonh
2023-07-06Fix prev event lookup in syncapi (#3141)devonh
The syncapi operates using userID's so when querying for the previous state event we need to lookup the userID from the given senderID before the state query.
2023-07-06Add pseudoID compatibility to Invites (#3126)devonh
2023-07-06Don't spam the logs - downgrade sentryTill Faelligen
2023-07-06Back to the original version for nowTill Faelligen
2023-07-06[debug] Downgrade NATSTill Faelligen