mirror of
https://github.com/element-hq/synapse.git
synced 2025-12-19 02:20:44 +00:00
Compare commits
369 Commits
erikj/dock
...
quenting/m
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a94f271e1 | ||
|
|
bf84bbf0b9 | ||
|
|
4c221322d8 | ||
|
|
8fc6727fe0 | ||
|
|
fc10d38849 | ||
|
|
4255c03599 | ||
|
|
c24cce73a1 | ||
|
|
1c5d2a4197 | ||
|
|
391c4f870b | ||
|
|
5eec67b6ef | ||
|
|
6722adf04e | ||
|
|
ac27c9e46a | ||
|
|
f729ef08c9 | ||
|
|
7d52ce7d4b | ||
|
|
709b7363fe | ||
|
|
560b43ac02 | ||
|
|
8b6ff1dba5 | ||
|
|
b4d0356e48 | ||
|
|
d52c17ce01 | ||
|
|
966a50bb63 | ||
|
|
d6125c583d | ||
|
|
da58e55a0b | ||
|
|
a5a454fc35 | ||
|
|
1caff75526 | ||
|
|
7b75922020 | ||
|
|
26c1330764 | ||
|
|
48303fcbcc | ||
|
|
53a3783750 | ||
|
|
b913aaa788 | ||
|
|
dab88a7b1f | ||
|
|
ca69d0f571 | ||
|
|
02ebcf7725 | ||
|
|
cdd5979129 | ||
|
|
89801e04ca | ||
|
|
7098d47f29 | ||
|
|
26f81fb5be | ||
|
|
d844afdc29 | ||
|
|
bb80894391 | ||
|
|
e43c2b023e | ||
|
|
2999a14aed | ||
|
|
1a6b718f8c | ||
|
|
594cd5f9fd | ||
|
|
b21134de3b | ||
|
|
a8f29c9913 | ||
|
|
9eed8cd878 | ||
|
|
8678516e79 | ||
|
|
573c6d7e69 | ||
|
|
689641b903 | ||
|
|
e75a23a63d | ||
|
|
e563e4bdf3 | ||
|
|
f4032d3e71 | ||
|
|
8da16e55fe | ||
|
|
d9cc0faf4b | ||
|
|
cca77af68f | ||
|
|
48742da536 | ||
|
|
940b932405 | ||
|
|
a2b2f6d09b | ||
|
|
defd4aca67 | ||
|
|
b4d95409fb | ||
|
|
f1a1c7fc53 | ||
|
|
cb9fa062b7 | ||
|
|
74b75cfd54 | ||
|
|
87d13fd143 | ||
|
|
ad2cd9aefd | ||
|
|
ad0ee53993 | ||
|
|
92b38c1afd | ||
|
|
a8e313836d | ||
|
|
7c9684b5dc | ||
|
|
f1e8d2d15a | ||
|
|
10428046e4 | ||
|
|
6eb98a4f1c | ||
|
|
950ba844f7 | ||
|
|
8b8d74d12f | ||
|
|
261e746281 | ||
|
|
993644ded0 | ||
|
|
a5d25bb623 | ||
|
|
f162c92f2a | ||
|
|
9ce489be5e | ||
|
|
fae75b0376 | ||
|
|
f77bfbfa30 | ||
|
|
1892ba5f67 | ||
|
|
a51daffba5 | ||
|
|
b05b2e14bb | ||
|
|
a308d99f30 | ||
|
|
a9fc1fd112 | ||
|
|
6a11bdf01d | ||
|
|
8fea190a1f | ||
|
|
81c19c4cd2 | ||
|
|
aaa3c36420 | ||
|
|
3e7eb45eb1 | ||
|
|
bab37dfc6f | ||
|
|
9f9ec92526 | ||
|
|
ff7b27013e | ||
|
|
e1f5f0fbb8 | ||
|
|
8c9f2743bc | ||
|
|
b076941a36 | ||
|
|
8bbe65f3c0 | ||
|
|
b7faf01f26 | ||
|
|
4f7f6ee9a0 | ||
|
|
a640b318df | ||
|
|
34b7586446 | ||
|
|
70b0e38603 | ||
|
|
f31360e34b | ||
|
|
3ad38b644d | ||
|
|
44ac2aa3b6 | ||
|
|
11db575218 | ||
|
|
30e9f6e469 | ||
|
|
eb62d12063 | ||
|
|
ceb3686dcd | ||
|
|
1dfa59b238 | ||
|
|
bef6568537 | ||
|
|
244a255065 | ||
|
|
932cb0a928 | ||
|
|
2dad718265 | ||
|
|
5d8446298c | ||
|
|
d845e939a9 | ||
|
|
23727869c7 | ||
|
|
c270355349 | ||
|
|
e3db7b2d81 | ||
|
|
2b620e0a15 | ||
|
|
39731bb205 | ||
|
|
1d6186265a | ||
|
|
46de0ee16b | ||
|
|
b221f0b84b | ||
|
|
b2c55bd049 | ||
|
|
ed583d9c81 | ||
|
|
f76dc9923c | ||
|
|
7e997fb8b1 | ||
|
|
dbc2290cbe | ||
|
|
2f6b86e79a | ||
|
|
37f9876ccf | ||
|
|
8b449a8ce6 | ||
|
|
53db8a914e | ||
|
|
e4868f8a1e | ||
|
|
dcad81082c | ||
|
|
c56b070e6f | ||
|
|
be726724a8 | ||
|
|
62ae56a4ac | ||
|
|
808dab0699 | ||
|
|
34306be5aa | ||
|
|
be4a16ff44 | ||
|
|
568051c0f0 | ||
|
|
ebbabfe782 | ||
|
|
69ac4b6a6e | ||
|
|
729026e604 | ||
|
|
bdf37ad4c4 | ||
|
|
8bbc98e66d | ||
|
|
4b9f4c2abf | ||
|
|
e8ee784c75 | ||
|
|
48c1307911 | ||
|
|
d225b6b3eb | ||
|
|
1daae43f3a | ||
|
|
a9ee832e48 | ||
|
|
13a99fba1b | ||
|
|
e3a0681ecf | ||
|
|
de05a64246 | ||
|
|
d221512498 | ||
|
|
ed0face8ad | ||
|
|
73529d3732 | ||
|
|
1648337775 | ||
|
|
dc8ddc6472 | ||
|
|
d3f9afd8d9 | ||
|
|
43c865f7c9 | ||
|
|
71d83477cb | ||
|
|
6a01af59e1 | ||
|
|
f583f1dce4 | ||
|
|
a574de0062 | ||
|
|
3fee32ed6b | ||
|
|
5884f0a956 | ||
|
|
79924aebef | ||
|
|
574aa53126 | ||
|
|
83894180b2 | ||
|
|
429ecb7564 | ||
|
|
9e1acea051 | ||
|
|
899d33f2ba | ||
|
|
df11af14db | ||
|
|
d88ba45db9 | ||
|
|
14f2b1eb00 | ||
|
|
2af729a193 | ||
|
|
0de0689ae8 | ||
|
|
4c44020838 | ||
|
|
4f6194492a | ||
|
|
ab62aa09da | ||
|
|
fb66e938b2 | ||
|
|
5a97bbd895 | ||
|
|
606da398fc | ||
|
|
677142b6a9 | ||
|
|
342f0c35b7 | ||
|
|
5871daf877 | ||
|
|
30e14c8510 | ||
|
|
3232bc2982 | ||
|
|
4ca13ce0dd | ||
|
|
8e229535fa | ||
|
|
e0ff850cb7 | ||
|
|
22fbc5be54 | ||
|
|
1cf3ff6b40 | ||
|
|
62d8b0361b | ||
|
|
4d6f7c0fc9 | ||
|
|
d48061b7e6 | ||
|
|
963a60c7e7 | ||
|
|
8e7da35402 | ||
|
|
028b103ae0 | ||
|
|
abb1384502 | ||
|
|
0ed1c64c83 | ||
|
|
1353fb3347 | ||
|
|
b15e17ce6e | ||
|
|
8cdd2d214e | ||
|
|
3fef535ff2 | ||
|
|
62134dcc77 | ||
|
|
23eed4f72a | ||
|
|
4721177241 | ||
|
|
7879f288df | ||
|
|
ccbd619b43 | ||
|
|
c896030f67 | ||
|
|
4d7e53707c | ||
|
|
cf69f8d59b | ||
|
|
20de685a4b | ||
|
|
8e9e6f1a0a | ||
|
|
57538eb4d9 | ||
|
|
45b35f8eae | ||
|
|
2ec257d608 | ||
|
|
daeaeb2a7b | ||
|
|
7786ae7e1c | ||
|
|
22aeb78b77 | ||
|
|
a9d2e40ea4 | ||
|
|
0c4f7a3d16 | ||
|
|
75b788f49f | ||
|
|
7be03d854b | ||
|
|
fa91655805 | ||
|
|
0d2b75cf92 | ||
|
|
ccce858c4a | ||
|
|
99c107920d | ||
|
|
1609855ff8 | ||
|
|
8f890447b0 | ||
|
|
b905ae27ca | ||
|
|
1ce59d7ba0 | ||
|
|
b3b793786c | ||
|
|
9c8f1a6d41 | ||
|
|
5b5280e3e5 | ||
|
|
635e3927d2 | ||
|
|
a1b8897668 | ||
|
|
76b9f14c0a | ||
|
|
1eccbfb82f | ||
|
|
2f5a77efae | ||
|
|
b11f5c984b | ||
|
|
27756c9fdf | ||
|
|
cc5e5893fe | ||
|
|
7c169f4d2c | ||
|
|
f75da9cc53 | ||
|
|
75c19bf57a | ||
|
|
b924a8e1a9 | ||
|
|
a8dcd686fb | ||
|
|
315b8d2032 | ||
|
|
9f47513458 | ||
|
|
ef7fbdfebd | ||
|
|
9cf0ef9c70 | ||
|
|
a023538822 | ||
|
|
f79dbd0f61 | ||
|
|
c89fea3fd1 | ||
|
|
554a92601a | ||
|
|
a98cb87bee | ||
|
|
6e8af83193 | ||
|
|
805e6c9a8f | ||
|
|
3c61ddbbc9 | ||
|
|
ae4c236a6d | ||
|
|
930a64b6c1 | ||
|
|
7a11c0ac4f | ||
|
|
cf711ac03c | ||
|
|
700d2cc4a0 | ||
|
|
1e74b50dc6 | ||
|
|
7c2d8f1f01 | ||
|
|
118b734081 | ||
|
|
7a6186b888 | ||
|
|
452a59f887 | ||
|
|
adeedb7b7c | ||
|
|
7c5fb13f7b | ||
|
|
f8d57ce656 | ||
|
|
13ed84c573 | ||
|
|
4243c1f074 | ||
|
|
3239b7459c | ||
|
|
c99203d98c | ||
|
|
9104a9f0d0 | ||
|
|
a412a5829d | ||
|
|
7ef89b985d | ||
|
|
bdf82efea5 | ||
|
|
afaf2d9388 | ||
|
|
199223062a | ||
|
|
97c3d98816 | ||
|
|
fa3adc896a | ||
|
|
79767a1108 | ||
|
|
4af654f0da | ||
|
|
1c7d85fdfe | ||
|
|
5a65e8a0d1 | ||
|
|
088992a484 | ||
|
|
d17d931a53 | ||
|
|
334123f0cd | ||
|
|
d8e81f67eb | ||
|
|
19a3d5b606 | ||
|
|
52813a8d94 | ||
|
|
a5485437cf | ||
|
|
e5b8a3e37f | ||
|
|
e88332b5f4 | ||
|
|
edfb7aad3a | ||
|
|
f983a77ab0 | ||
|
|
12d7303707 | ||
|
|
a3cb244755 | ||
|
|
3aae60f17b | ||
|
|
2c36a679ae | ||
|
|
c12ee0d5ba | ||
|
|
8aaff851b1 | ||
|
|
8c58eb7f17 | ||
|
|
ebdce69f6a | ||
|
|
c6eb99c878 | ||
|
|
5db3eec5bc | ||
|
|
f1c4dfb08b | ||
|
|
0edf1cacf7 | ||
|
|
d0f90bd04e | ||
|
|
0248ed70a9 | ||
|
|
e6816babf6 | ||
|
|
a8069e9739 | ||
|
|
863578bfcf | ||
|
|
9e59d18022 | ||
|
|
491365f199 | ||
|
|
dad1559721 | ||
|
|
8c4937b216 | ||
|
|
b84e31375b | ||
|
|
06953bc193 | ||
|
|
265ee88f34 | ||
|
|
ab94bce02c | ||
|
|
17d6c28285 | ||
|
|
4a7c58642c | ||
|
|
ce9385819b | ||
|
|
a963f579de | ||
|
|
3f06bbc0ac | ||
|
|
fcbc79bb87 | ||
|
|
aabf577166 | ||
|
|
7d8f0ef351 | ||
|
|
eab0b548e4 | ||
|
|
81cef38d4b | ||
|
|
e2f8476044 | ||
|
|
18c1196893 | ||
|
|
8a3270075b | ||
|
|
f458dff16d | ||
|
|
6b709c512d | ||
|
|
5c2a837e3c | ||
|
|
64f5a4a353 | ||
|
|
7dd14fadb1 | ||
|
|
5624c8b961 | ||
|
|
4e3868dc46 | ||
|
|
d16910ca02 | ||
|
|
225f378ffa | ||
|
|
8bd9ff0783 | ||
|
|
466f344547 | ||
|
|
726006cdf2 | ||
|
|
967b6948b0 | ||
|
|
d7198dfb95 | ||
|
|
94ef2f4f5d | ||
|
|
bb5a692946 | ||
|
|
ad179b0136 | ||
|
|
5147ce294a | ||
|
|
f35bc08d39 | ||
|
|
f2616edb73 | ||
|
|
86a2a0258f | ||
|
|
0893ee9af8 | ||
|
|
887f773472 | ||
|
|
9edb725ebc | ||
|
|
c97251d5ba | ||
|
|
7e2412265d | ||
|
|
7ef00b7628 |
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
@@ -2,4 +2,4 @@
|
|||||||
(using a matrix.org account if necessary). We do not use GitHub issues for
|
(using a matrix.org account if necessary). We do not use GitHub issues for
|
||||||
support.
|
support.
|
||||||
|
|
||||||
**If you want to report a security issue** please see https://matrix.org/security-disclosure-policy/
|
**If you want to report a security issue** please see https://element.io/security/security-disclosure-policy
|
||||||
|
|||||||
2
.github/ISSUE_TEMPLATE/BUG_REPORT.yml
vendored
2
.github/ISSUE_TEMPLATE/BUG_REPORT.yml
vendored
@@ -7,7 +7,7 @@ body:
|
|||||||
**THIS IS NOT A SUPPORT CHANNEL!**
|
**THIS IS NOT A SUPPORT CHANNEL!**
|
||||||
**IF YOU HAVE SUPPORT QUESTIONS ABOUT RUNNING OR CONFIGURING YOUR OWN HOME SERVER**, please ask in **[#synapse:matrix.org](https://matrix.to/#/#synapse:matrix.org)** (using a matrix.org account if necessary).
|
**IF YOU HAVE SUPPORT QUESTIONS ABOUT RUNNING OR CONFIGURING YOUR OWN HOME SERVER**, please ask in **[#synapse:matrix.org](https://matrix.to/#/#synapse:matrix.org)** (using a matrix.org account if necessary).
|
||||||
|
|
||||||
If you want to report a security issue, please see https://matrix.org/security-disclosure-policy/
|
If you want to report a security issue, please see https://element.io/security/security-disclosure-policy
|
||||||
|
|
||||||
This is a bug report form. By following the instructions below and completing the sections with your information, you will help the us to get all the necessary data to fix your issue.
|
This is a bug report form. By following the instructions below and completing the sections with your information, you will help the us to get all the necessary data to fix your issue.
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
|||||||
run: docker buildx inspect
|
run: docker buildx inspect
|
||||||
|
|
||||||
- name: Install Cosign
|
- name: Install Cosign
|
||||||
uses: sigstore/cosign-installer@v3.5.0
|
uses: sigstore/cosign-installer@v3.6.0
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -72,7 +72,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build and push all platforms
|
- name: Build and push all platforms
|
||||||
id: build-and-push
|
id: build-and-push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
labels: |
|
labels: |
|
||||||
|
|||||||
2
.github/workflows/docs-pr-netlify.yaml
vendored
2
.github/workflows/docs-pr-netlify.yaml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
# There's a 'download artifact' action, but it hasn't been updated for the workflow_run action
|
# There's a 'download artifact' action, but it hasn't been updated for the workflow_run action
|
||||||
# (https://github.com/actions/download-artifact/issues/60) so instead we get this mess:
|
# (https://github.com/actions/download-artifact/issues/60) so instead we get this mess:
|
||||||
- name: 📥 Download artifact
|
- name: 📥 Download artifact
|
||||||
uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3.1.4
|
uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6
|
||||||
with:
|
with:
|
||||||
workflow: docs-pr.yaml
|
workflow: docs-pr.yaml
|
||||||
run_id: ${{ github.event.workflow_run.id }}
|
run_id: ${{ github.event.workflow_run.id }}
|
||||||
|
|||||||
14
.github/workflows/fix_lint.yaml
vendored
14
.github/workflows/fix_lint.yaml
vendored
@@ -29,17 +29,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
install-project: "false"
|
install-project: "false"
|
||||||
|
|
||||||
- name: Import order (isort)
|
- name: Run ruff check
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: poetry run isort .
|
run: poetry run ruff check --fix .
|
||||||
|
|
||||||
- name: Code style (black)
|
- name: Run ruff format
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: poetry run black .
|
run: poetry run ruff format --quiet .
|
||||||
|
|
||||||
- name: Semantic checks (ruff)
|
|
||||||
continue-on-error: true
|
|
||||||
run: poetry run ruff --fix .
|
|
||||||
|
|
||||||
- run: cargo clippy --all-features --fix -- -D warnings
|
- run: cargo clippy --all-features --fix -- -D warnings
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@@ -49,4 +45,4 @@ jobs:
|
|||||||
|
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v5
|
- uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
with:
|
with:
|
||||||
commit_message: "Attempt to fix linting"
|
commit_message: "Attempt to fix linting"
|
||||||
|
|||||||
8
.github/workflows/release-artifacts.yml
vendored
8
.github/workflows/release-artifacts.yml
vendored
@@ -102,7 +102,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04, macos-11]
|
os: [ubuntu-20.04, macos-12]
|
||||||
arch: [x86_64, aarch64]
|
arch: [x86_64, aarch64]
|
||||||
# is_pr is a flag used to exclude certain jobs from the matrix on PRs.
|
# is_pr is a flag used to exclude certain jobs from the matrix on PRs.
|
||||||
# It is not read by the rest of the workflow.
|
# It is not read by the rest of the workflow.
|
||||||
@@ -112,9 +112,9 @@ jobs:
|
|||||||
exclude:
|
exclude:
|
||||||
# Don't build macos wheels on PR CI.
|
# Don't build macos wheels on PR CI.
|
||||||
- is_pr: true
|
- is_pr: true
|
||||||
os: "macos-11"
|
os: "macos-12"
|
||||||
# Don't build aarch64 wheels on mac.
|
# Don't build aarch64 wheels on mac.
|
||||||
- os: "macos-11"
|
- os: "macos-12"
|
||||||
arch: aarch64
|
arch: aarch64
|
||||||
# Don't build aarch64 wheels on PR CI.
|
# Don't build aarch64 wheels on PR CI.
|
||||||
- is_pr: true
|
- is_pr: true
|
||||||
@@ -130,7 +130,7 @@ jobs:
|
|||||||
python-version: "3.x"
|
python-version: "3.x"
|
||||||
|
|
||||||
- name: Install cibuildwheel
|
- name: Install cibuildwheel
|
||||||
run: python -m pip install cibuildwheel==2.16.2
|
run: python -m pip install cibuildwheel==2.19.1
|
||||||
|
|
||||||
- name: Set up QEMU to emulate aarch64
|
- name: Set up QEMU to emulate aarch64
|
||||||
if: matrix.arch == 'aarch64'
|
if: matrix.arch == 'aarch64'
|
||||||
|
|||||||
39
.github/workflows/tests.yml
vendored
39
.github/workflows/tests.yml
vendored
@@ -21,6 +21,7 @@ jobs:
|
|||||||
trial: ${{ !startsWith(github.ref, 'refs/pull/') || steps.filter.outputs.trial }}
|
trial: ${{ !startsWith(github.ref, 'refs/pull/') || steps.filter.outputs.trial }}
|
||||||
integration: ${{ !startsWith(github.ref, 'refs/pull/') || steps.filter.outputs.integration }}
|
integration: ${{ !startsWith(github.ref, 'refs/pull/') || steps.filter.outputs.integration }}
|
||||||
linting: ${{ !startsWith(github.ref, 'refs/pull/') || steps.filter.outputs.linting }}
|
linting: ${{ !startsWith(github.ref, 'refs/pull/') || steps.filter.outputs.linting }}
|
||||||
|
linting_readme: ${{ !startsWith(github.ref, 'refs/pull/') || steps.filter.outputs.linting_readme }}
|
||||||
steps:
|
steps:
|
||||||
- uses: dorny/paths-filter@v3
|
- uses: dorny/paths-filter@v3
|
||||||
id: filter
|
id: filter
|
||||||
@@ -73,6 +74,9 @@ jobs:
|
|||||||
- 'poetry.lock'
|
- 'poetry.lock'
|
||||||
- '.github/workflows/tests.yml'
|
- '.github/workflows/tests.yml'
|
||||||
|
|
||||||
|
linting_readme:
|
||||||
|
- 'README.rst'
|
||||||
|
|
||||||
check-sampleconfig:
|
check-sampleconfig:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: changes
|
needs: changes
|
||||||
@@ -127,15 +131,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
install-project: "false"
|
install-project: "false"
|
||||||
|
|
||||||
- name: Import order (isort)
|
- name: Run ruff check
|
||||||
run: poetry run isort --check --diff .
|
run: poetry run ruff check --output-format=github .
|
||||||
|
|
||||||
- name: Code style (black)
|
- name: Run ruff format
|
||||||
run: poetry run black --check --diff .
|
run: poetry run ruff format --check .
|
||||||
|
|
||||||
- name: Semantic checks (ruff)
|
|
||||||
# --quiet suppresses the update check.
|
|
||||||
run: poetry run ruff --quiet .
|
|
||||||
|
|
||||||
lint-mypy:
|
lint-mypy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -269,6 +269,20 @@ jobs:
|
|||||||
|
|
||||||
- run: cargo fmt --check
|
- run: cargo fmt --check
|
||||||
|
|
||||||
|
# This is to detect issues with the rst file, which can otherwise cause issues
|
||||||
|
# when uploading packages to PyPi.
|
||||||
|
lint-readme:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: changes
|
||||||
|
if: ${{ needs.changes.outputs.linting_readme == 'true' }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.x"
|
||||||
|
- run: "pip install rstcheck"
|
||||||
|
- run: "rstcheck --report-level=WARNING README.rst"
|
||||||
|
|
||||||
# Dummy step to gate other tests on without repeating the whole list
|
# Dummy step to gate other tests on without repeating the whole list
|
||||||
linting-done:
|
linting-done:
|
||||||
if: ${{ !cancelled() }} # Run this even if prior jobs were skipped
|
if: ${{ !cancelled() }} # Run this even if prior jobs were skipped
|
||||||
@@ -284,9 +298,10 @@ jobs:
|
|||||||
- lint-clippy
|
- lint-clippy
|
||||||
- lint-clippy-nightly
|
- lint-clippy-nightly
|
||||||
- lint-rustfmt
|
- lint-rustfmt
|
||||||
|
- lint-readme
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: matrix-org/done-action@v2
|
- uses: matrix-org/done-action@v3
|
||||||
with:
|
with:
|
||||||
needs: ${{ toJSON(needs) }}
|
needs: ${{ toJSON(needs) }}
|
||||||
|
|
||||||
@@ -301,6 +316,7 @@ jobs:
|
|||||||
lint-clippy
|
lint-clippy
|
||||||
lint-clippy-nightly
|
lint-clippy-nightly
|
||||||
lint-rustfmt
|
lint-rustfmt
|
||||||
|
lint-readme
|
||||||
|
|
||||||
|
|
||||||
calculate-test-jobs:
|
calculate-test-jobs:
|
||||||
@@ -479,6 +495,9 @@ jobs:
|
|||||||
volumes:
|
volumes:
|
||||||
- ${{ github.workspace }}:/src
|
- ${{ github.workspace }}:/src
|
||||||
env:
|
env:
|
||||||
|
# If this is a pull request to a release branch, use that branch as default branch for sytest, else use develop
|
||||||
|
# This works because the release script always create a branch on the sytest repo with the same name as the release branch
|
||||||
|
SYTEST_DEFAULT_BRANCH: ${{ startsWith(github.base_ref, 'release-') && github.base_ref || 'develop' }}
|
||||||
SYTEST_BRANCH: ${{ github.head_ref }}
|
SYTEST_BRANCH: ${{ github.head_ref }}
|
||||||
POSTGRES: ${{ matrix.job.postgres && 1}}
|
POSTGRES: ${{ matrix.job.postgres && 1}}
|
||||||
MULTI_POSTGRES: ${{ (matrix.job.postgres == 'multi-postgres') || '' }}
|
MULTI_POSTGRES: ${{ (matrix.job.postgres == 'multi-postgres') || '' }}
|
||||||
@@ -714,7 +733,7 @@ jobs:
|
|||||||
- linting-done
|
- linting-done
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: matrix-org/done-action@v2
|
- uses: matrix-org/done-action@v3
|
||||||
with:
|
with:
|
||||||
needs: ${{ toJSON(needs) }}
|
needs: ${{ toJSON(needs) }}
|
||||||
|
|
||||||
|
|||||||
557
CHANGES.md
557
CHANGES.md
@@ -1,3 +1,560 @@
|
|||||||
|
# Synapse 1.114.0 (2024-09-02)
|
||||||
|
|
||||||
|
This release enables support for
|
||||||
|
[MSC4186](https://github.com/matrix-org/matrix-spec-proposals/pull/4186) —
|
||||||
|
Simplified Sliding Sync. This allows using the upcoming releases of the Element
|
||||||
|
X mobile apps without having to run a Sliding Sync Proxy.
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- Enable native sliding sync support ([MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) and [MSC4186](https://github.com/matrix-org/matrix-spec-proposals/pull/4186)) by default. ([\#17648](https://github.com/element-hq/synapse/issues/17648))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Synapse 1.114.0rc3 (2024-08-30)
|
||||||
|
|
||||||
|
### Bugfixes
|
||||||
|
|
||||||
|
- Fix regression in v1.114.0rc2 that caused workers to fail to start. ([\#17626](https://github.com/element-hq/synapse/issues/17626))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Synapse 1.114.0rc2 (2024-08-30)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- Improve cross-signing upload when using [MSC3861](https://github.com/matrix-org/matrix-spec-proposals/pull/3861) to use a custom UIA flow stage, with web fallback support. ([\#17509](https://github.com/element-hq/synapse/issues/17509))
|
||||||
|
- Make `hash_password` script accept password input from stdin. ([\#17608](https://github.com/element-hq/synapse/issues/17608))
|
||||||
|
|
||||||
|
### Bugfixes
|
||||||
|
|
||||||
|
- Fix hierarchy returning 403 when room is accessible through federation. Contributed by Krishan (@kfiven). ([\#17194](https://github.com/element-hq/synapse/issues/17194))
|
||||||
|
- Fix content-length on federation `/thumbnail` responses. ([\#17532](https://github.com/element-hq/synapse/issues/17532))
|
||||||
|
- Fix authenticated media responses using a wrong limit when following redirects over federation. ([\#17543](https://github.com/element-hq/synapse/issues/17543))
|
||||||
|
|
||||||
|
### Internal Changes
|
||||||
|
|
||||||
|
- MSC3861: load the issuer and account management URLs from OIDC discovery. ([\#17407](https://github.com/element-hq/synapse/issues/17407))
|
||||||
|
- Refactor sliding sync class into multiple files. ([\#17595](https://github.com/element-hq/synapse/issues/17595))
|
||||||
|
- Store sliding sync per-connection state in the database. ([\#17599](https://github.com/element-hq/synapse/issues/17599))
|
||||||
|
- Make the sliding sync `PerConnectionState` class immutable. ([\#17600](https://github.com/element-hq/synapse/issues/17600))
|
||||||
|
- Add support to `@tag_args` for standalone functions. ([\#17604](https://github.com/element-hq/synapse/issues/17604))
|
||||||
|
- Speed up incremental syncs in sliding sync by adding some more caching. ([\#17606](https://github.com/element-hq/synapse/issues/17606))
|
||||||
|
- Always return the user's own read receipts in sliding sync. ([\#17617](https://github.com/element-hq/synapse/issues/17617))
|
||||||
|
- Replace `isort` and `black` with `ruff`. ([\#17620](https://github.com/element-hq/synapse/issues/17620))
|
||||||
|
- Refactor sliding sync code to move room list logic out into a separate class. ([\#17622](https://github.com/element-hq/synapse/issues/17622))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Updates to locked dependencies
|
||||||
|
|
||||||
|
* Bump attrs from 23.2.0 to 24.2.0. ([\#17609](https://github.com/element-hq/synapse/issues/17609))
|
||||||
|
* Bump cryptography from 42.0.8 to 43.0.0. ([\#17584](https://github.com/element-hq/synapse/issues/17584))
|
||||||
|
* Bump phonenumbers from 8.13.43 to 8.13.44. ([\#17610](https://github.com/element-hq/synapse/issues/17610))
|
||||||
|
* Bump pygithub from 2.3.0 to 2.4.0. ([\#17612](https://github.com/element-hq/synapse/issues/17612))
|
||||||
|
* Bump pyyaml from 6.0.1 to 6.0.2. ([\#17611](https://github.com/element-hq/synapse/issues/17611))
|
||||||
|
* Bump sentry-sdk from 2.12.0 to 2.13.0. ([\#17585](https://github.com/element-hq/synapse/issues/17585))
|
||||||
|
* Bump serde from 1.0.206 to 1.0.208. ([\#17581](https://github.com/element-hq/synapse/issues/17581))
|
||||||
|
* Bump serde from 1.0.208 to 1.0.209. ([\#17613](https://github.com/element-hq/synapse/issues/17613))
|
||||||
|
* Bump serde_json from 1.0.124 to 1.0.125. ([\#17582](https://github.com/element-hq/synapse/issues/17582))
|
||||||
|
* Bump serde_json from 1.0.125 to 1.0.127. ([\#17614](https://github.com/element-hq/synapse/issues/17614))
|
||||||
|
* Bump types-jsonschema from 4.23.0.20240712 to 4.23.0.20240813. ([\#17583](https://github.com/element-hq/synapse/issues/17583))
|
||||||
|
* Bump types-setuptools from 71.1.0.20240726 to 71.1.0.20240818. ([\#17586](https://github.com/element-hq/synapse/issues/17586))
|
||||||
|
|
||||||
|
# Synapse 1.114.0rc1 (2024-08-20)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- Add a flag to `/versions`, `org.matrix.simplified_msc3575`, to indicate whether experimental sliding sync support has been enabled. ([\#17571](https://github.com/element-hq/synapse/issues/17571))
|
||||||
|
- Handle changes in `timeline_limit` in experimental sliding sync. ([\#17579](https://github.com/element-hq/synapse/issues/17579))
|
||||||
|
- Correctly track read receipts that should be sent down in experimental sliding sync. ([\#17575](https://github.com/element-hq/synapse/issues/17575), [\#17589](https://github.com/element-hq/synapse/issues/17589), [\#17592](https://github.com/element-hq/synapse/issues/17592))
|
||||||
|
|
||||||
|
### Bugfixes
|
||||||
|
|
||||||
|
- Start handlers for new media endpoints when media resource configured. ([\#17483](https://github.com/element-hq/synapse/issues/17483))
|
||||||
|
- Fix timeline ordering (using `stream_ordering` instead of topological ordering) in experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17510](https://github.com/element-hq/synapse/issues/17510))
|
||||||
|
- Fix experimental sliding sync implementation to remember any updates in rooms that were not sent down immediately. ([\#17535](https://github.com/element-hq/synapse/issues/17535))
|
||||||
|
- Better exclude partially stated rooms if we must await full state in experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17538](https://github.com/element-hq/synapse/issues/17538))
|
||||||
|
- Handle lower-case http headers in `_Mulitpart_Parser_Protocol`. ([\#17545](https://github.com/element-hq/synapse/issues/17545))
|
||||||
|
- Fix fetching federation signing keys from servers that omit `old_verify_keys`. Contributed by @tulir @ Beeper. ([\#17568](https://github.com/element-hq/synapse/issues/17568))
|
||||||
|
- Fix bug where we would respond with an error when a remote server asked for media that had a length of 0, using the new multipart federation media endpoint. ([\#17570](https://github.com/element-hq/synapse/issues/17570))
|
||||||
|
|
||||||
|
### Improved Documentation
|
||||||
|
|
||||||
|
- Clarify default behaviour of the
|
||||||
|
[`auto_accept_invites.worker_to_run_on`](https://element-hq.github.io/synapse/develop/usage/configuration/config_documentation.html#auto-accept-invites)
|
||||||
|
option. ([\#17515](https://github.com/element-hq/synapse/issues/17515))
|
||||||
|
- Improve docstrings for profile methods. ([\#17559](https://github.com/element-hq/synapse/issues/17559))
|
||||||
|
|
||||||
|
### Internal Changes
|
||||||
|
|
||||||
|
- Add more tracing to experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17514](https://github.com/element-hq/synapse/issues/17514))
|
||||||
|
- Fixup comment in sliding sync implementation. ([\#17531](https://github.com/element-hq/synapse/issues/17531))
|
||||||
|
- Replace override of deprecated method `HTTPAdapter.get_connection` with `get_connection_with_tls_context`. ([\#17536](https://github.com/element-hq/synapse/issues/17536))
|
||||||
|
- Fix performance of device lists in `/key/changes` and sliding sync. ([\#17537](https://github.com/element-hq/synapse/issues/17537), [\#17548](https://github.com/element-hq/synapse/issues/17548))
|
||||||
|
- Bump setuptools from 67.6.0 to 72.1.0. ([\#17542](https://github.com/element-hq/synapse/issues/17542))
|
||||||
|
- Add a utility function for generating random event IDs. ([\#17557](https://github.com/element-hq/synapse/issues/17557))
|
||||||
|
- Speed up responding to media requests. ([\#17558](https://github.com/element-hq/synapse/issues/17558), [\#17561](https://github.com/element-hq/synapse/issues/17561), [\#17564](https://github.com/element-hq/synapse/issues/17564), [\#17566](https://github.com/element-hq/synapse/issues/17566), [\#17567](https://github.com/element-hq/synapse/issues/17567), [\#17569](https://github.com/element-hq/synapse/issues/17569))
|
||||||
|
- Test github token before running release script steps. ([\#17562](https://github.com/element-hq/synapse/issues/17562))
|
||||||
|
- Reduce log spam of multipart files. ([\#17563](https://github.com/element-hq/synapse/issues/17563))
|
||||||
|
- Refactor per-connection state in experimental sliding sync handler. ([\#17574](https://github.com/element-hq/synapse/issues/17574))
|
||||||
|
- Add histogram metrics for sliding sync processing time. ([\#17593](https://github.com/element-hq/synapse/issues/17593))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Updates to locked dependencies
|
||||||
|
|
||||||
|
* Bump bytes from 1.6.1 to 1.7.1. ([\#17526](https://github.com/element-hq/synapse/issues/17526))
|
||||||
|
* Bump lxml from 5.2.2 to 5.3.0. ([\#17550](https://github.com/element-hq/synapse/issues/17550))
|
||||||
|
* Bump phonenumbers from 8.13.42 to 8.13.43. ([\#17551](https://github.com/element-hq/synapse/issues/17551))
|
||||||
|
* Bump regex from 1.10.5 to 1.10.6. ([\#17527](https://github.com/element-hq/synapse/issues/17527))
|
||||||
|
* Bump sentry-sdk from 2.10.0 to 2.12.0. ([\#17553](https://github.com/element-hq/synapse/issues/17553))
|
||||||
|
* Bump serde from 1.0.204 to 1.0.206. ([\#17556](https://github.com/element-hq/synapse/issues/17556))
|
||||||
|
* Bump serde_json from 1.0.122 to 1.0.124. ([\#17555](https://github.com/element-hq/synapse/issues/17555))
|
||||||
|
* Bump sigstore/cosign-installer from 3.5.0 to 3.6.0. ([\#17549](https://github.com/element-hq/synapse/issues/17549))
|
||||||
|
* Bump types-pyyaml from 6.0.12.20240311 to 6.0.12.20240808. ([\#17552](https://github.com/element-hq/synapse/issues/17552))
|
||||||
|
* Bump types-requests from 2.31.0.20240406 to 2.32.0.20240712. ([\#17524](https://github.com/element-hq/synapse/issues/17524))
|
||||||
|
|
||||||
|
# Synapse 1.113.0 (2024-08-13)
|
||||||
|
|
||||||
|
No significant changes since 1.113.0rc1.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Synapse 1.113.0rc1 (2024-08-06)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- Track which rooms have been sent to clients in the experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17447](https://github.com/element-hq/synapse/issues/17447))
|
||||||
|
- Add Account Data extension support to experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17477](https://github.com/element-hq/synapse/issues/17477))
|
||||||
|
- Add receipts extension support to experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17489](https://github.com/element-hq/synapse/issues/17489))
|
||||||
|
- Add typing notification extension support to experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17505](https://github.com/element-hq/synapse/issues/17505))
|
||||||
|
|
||||||
|
### Bugfixes
|
||||||
|
|
||||||
|
- Update experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint to handle invite/knock rooms when filtering. ([\#17450](https://github.com/element-hq/synapse/issues/17450))
|
||||||
|
- Fix a bug introduced in v1.110.0 which caused `/keys/query` to return incomplete results, leading to high network activity and CPU usage on Matrix clients. ([\#17499](https://github.com/element-hq/synapse/issues/17499))
|
||||||
|
|
||||||
|
### Improved Documentation
|
||||||
|
|
||||||
|
- Update the [`allowed_local_3pids`](https://element-hq.github.io/synapse/v1.112/usage/configuration/config_documentation.html#allowed_local_3pids) config option's msisdn address to a working example. ([\#17476](https://github.com/element-hq/synapse/issues/17476))
|
||||||
|
|
||||||
|
### Internal Changes
|
||||||
|
|
||||||
|
- Change sliding sync to use their own token format in preparation for storing per-connection state. ([\#17452](https://github.com/element-hq/synapse/issues/17452))
|
||||||
|
- Ensure we don't send down negative `bump_stamp` in experimental sliding sync endpoint. ([\#17478](https://github.com/element-hq/synapse/issues/17478))
|
||||||
|
- Do not send down empty room entries down experimental sliding sync endpoint. ([\#17479](https://github.com/element-hq/synapse/issues/17479))
|
||||||
|
- Refactor Sliding Sync tests to better utilize the `SlidingSyncBase`. ([\#17481](https://github.com/element-hq/synapse/issues/17481), [\#17482](https://github.com/element-hq/synapse/issues/17482))
|
||||||
|
- Add some opentracing tags and logging to the experimental sliding sync implementation. ([\#17501](https://github.com/element-hq/synapse/issues/17501))
|
||||||
|
- Split and move Sliding Sync tests so we have some more sane test file sizes. ([\#17504](https://github.com/element-hq/synapse/issues/17504))
|
||||||
|
- Update the `limited` field description in the Sliding Sync response to accurately describe what it actually represents. ([\#17507](https://github.com/element-hq/synapse/issues/17507))
|
||||||
|
- Easier to understand `timeline` assertions in Sliding Sync tests. ([\#17511](https://github.com/element-hq/synapse/issues/17511))
|
||||||
|
- Reset the sliding sync connection if we don't recognize the per-connection state position. ([\#17529](https://github.com/element-hq/synapse/issues/17529))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Updates to locked dependencies
|
||||||
|
|
||||||
|
* Bump bcrypt from 4.1.3 to 4.2.0. ([\#17495](https://github.com/element-hq/synapse/issues/17495))
|
||||||
|
* Bump black from 24.4.2 to 24.8.0. ([\#17522](https://github.com/element-hq/synapse/issues/17522))
|
||||||
|
* Bump phonenumbers from 8.13.39 to 8.13.42. ([\#17521](https://github.com/element-hq/synapse/issues/17521))
|
||||||
|
* Bump ruff from 0.5.4 to 0.5.5. ([\#17494](https://github.com/element-hq/synapse/issues/17494))
|
||||||
|
* Bump serde_json from 1.0.120 to 1.0.121. ([\#17493](https://github.com/element-hq/synapse/issues/17493))
|
||||||
|
* Bump serde_json from 1.0.121 to 1.0.122. ([\#17525](https://github.com/element-hq/synapse/issues/17525))
|
||||||
|
* Bump towncrier from 23.11.0 to 24.7.1. ([\#17523](https://github.com/element-hq/synapse/issues/17523))
|
||||||
|
* Bump types-pyopenssl from 24.1.0.20240425 to 24.1.0.20240722. ([\#17496](https://github.com/element-hq/synapse/issues/17496))
|
||||||
|
* Bump types-setuptools from 70.1.0.20240627 to 71.1.0.20240726. ([\#17497](https://github.com/element-hq/synapse/issues/17497))
|
||||||
|
|
||||||
|
# Synapse 1.112.0 (2024-07-30)
|
||||||
|
|
||||||
|
This security release is to update our locked dependency on Twisted to 24.7.0rc1, which includes a security fix for [CVE-2024-41671 / GHSA-c8m8-j448-xjx7: Disordered HTTP pipeline response in twisted.web, again](https://github.com/twisted/twisted/security/advisories/GHSA-c8m8-j448-xjx7).
|
||||||
|
|
||||||
|
Note that this security fix is also available as **Synapse 1.111.1**, which does not include the rest of the changes in Synapse 1.112.0.
|
||||||
|
|
||||||
|
This issue means that, if multiple HTTP requests are pipelined in the same TCP connection, Synapse can send responses to the wrong HTTP request.
|
||||||
|
If a reverse proxy was configured to use HTTP pipelining, this could result in responses being sent to the wrong user, severely harming confidentiality.
|
||||||
|
|
||||||
|
With that said, despite being a high severity issue, **we consider it unlikely that Synapse installations will be affected**.
|
||||||
|
The use of HTTP pipelining in this fashion would cause worse performance for clients (request-response latencies would be increased as users' responses would be artificially blocked behind other users' slow requests). Further, Nginx and Haproxy, two common reverse proxies, do not appear to support configuring their upstreams to use HTTP pipelining and thus would not be affected. For both of these reasons, we consider it unlikely that a Synapse deployment would be set up in such a configuration.
|
||||||
|
|
||||||
|
Despite that, we cannot rule out that some installations may exist with this unusual setup and so we are releasing this security update today.
|
||||||
|
|
||||||
|
**pip users:** Note that by default, upgrading Synapse using pip will not automatically upgrade Twisted. **Please manually install the new version of Twisted** using `pip install Twisted==24.7.0rc1`. Note also that even the `--upgrade-strategy=eager` flag to `pip install -U matrix-synapse` will not upgrade Twisted to a patched version because it is only a release candidate at this time.
|
||||||
|
|
||||||
|
### Internal Changes
|
||||||
|
|
||||||
|
- Upgrade locked dependency on Twisted to 24.7.0rc1. ([\#17502](https://github.com/element-hq/synapse/issues/17502))
|
||||||
|
|
||||||
|
|
||||||
|
# Synapse 1.112.0rc1 (2024-07-23)
|
||||||
|
|
||||||
|
Please note that this release candidate does not include the security dependency update
|
||||||
|
included in version 1.111.1 as this version was released before 1.111.1.
|
||||||
|
The same security fix can be found in the full release of 1.112.0.
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- Add to-device extension support to experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17416](https://github.com/element-hq/synapse/issues/17416))
|
||||||
|
- Populate `name`/`avatar` fields in experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17418](https://github.com/element-hq/synapse/issues/17418))
|
||||||
|
- Populate `heroes` and room summary fields (`joined_count`, `invited_count`) in experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17419](https://github.com/element-hq/synapse/issues/17419))
|
||||||
|
- Populate `is_dm` room field in experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17429](https://github.com/element-hq/synapse/issues/17429))
|
||||||
|
- Add room subscriptions to experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17432](https://github.com/element-hq/synapse/issues/17432))
|
||||||
|
- Prepare for authenticated media freeze. ([\#17433](https://github.com/element-hq/synapse/issues/17433))
|
||||||
|
- Add E2EE extension support to experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17454](https://github.com/element-hq/synapse/issues/17454))
|
||||||
|
|
||||||
|
### Bugfixes
|
||||||
|
|
||||||
|
- Add configurable option to always include offline users in presence sync results. Contributed by @Michael-Hollister. ([\#17231](https://github.com/element-hq/synapse/issues/17231))
|
||||||
|
- Fix bug in experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint when using room type filters and the user has one or more remote invites. ([\#17434](https://github.com/element-hq/synapse/issues/17434))
|
||||||
|
- Order `heroes` by `stream_ordering` as the Matrix specification states (applies to `/sync`). ([\#17435](https://github.com/element-hq/synapse/issues/17435))
|
||||||
|
- Fix rare bug where `/sync` would break for a user when using workers with multiple stream writers. ([\#17438](https://github.com/element-hq/synapse/issues/17438))
|
||||||
|
|
||||||
|
### Improved Documentation
|
||||||
|
|
||||||
|
- Update the readme image to have a white background, so that it is readable in dark mode. ([\#17387](https://github.com/element-hq/synapse/issues/17387))
|
||||||
|
- Add Red Hat Enterprise Linux and Rocky Linux 8 and 9 installation instructions. ([\#17423](https://github.com/element-hq/synapse/issues/17423))
|
||||||
|
- Improve documentation for the [`default_power_level_content_override`](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html#default_power_level_content_override) config option. ([\#17451](https://github.com/element-hq/synapse/issues/17451))
|
||||||
|
|
||||||
|
### Internal Changes
|
||||||
|
|
||||||
|
- Make sure we always use the right logic for enabling the media repo. ([\#17424](https://github.com/element-hq/synapse/issues/17424))
|
||||||
|
- Fix argument documentation for method `RateLimiter.record_action`. ([\#17426](https://github.com/element-hq/synapse/issues/17426))
|
||||||
|
- Reduce volume of 'Waiting for current token' logs, which were introduced in v1.109.0. ([\#17428](https://github.com/element-hq/synapse/issues/17428))
|
||||||
|
- Limit concurrent remote downloads to 6 per IP address, and decrement remote downloads without a content-length from the ratelimiter after the download is complete. ([\#17439](https://github.com/element-hq/synapse/issues/17439))
|
||||||
|
- Remove unnecessary call to resume producing in fake channel. ([\#17449](https://github.com/element-hq/synapse/issues/17449))
|
||||||
|
- Update experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint to bump room when it is created. ([\#17453](https://github.com/element-hq/synapse/issues/17453))
|
||||||
|
- Speed up generating sliding sync responses. ([\#17458](https://github.com/element-hq/synapse/issues/17458))
|
||||||
|
- Add cache to `get_rooms_for_local_user_where_membership_is` to speed up sliding sync. ([\#17460](https://github.com/element-hq/synapse/issues/17460))
|
||||||
|
- Speed up fetching room keys from backup. ([\#17461](https://github.com/element-hq/synapse/issues/17461))
|
||||||
|
- Speed up sorting of the room list in sliding sync. ([\#17468](https://github.com/element-hq/synapse/issues/17468))
|
||||||
|
- Implement handling of `$ME` as a state key in sliding sync. ([\#17469](https://github.com/element-hq/synapse/issues/17469))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Updates to locked dependencies
|
||||||
|
|
||||||
|
* Bump bytes from 1.6.0 to 1.6.1. ([\#17441](https://github.com/element-hq/synapse/issues/17441))
|
||||||
|
* Bump hiredis from 2.3.2 to 3.0.0. ([\#17464](https://github.com/element-hq/synapse/issues/17464))
|
||||||
|
* Bump jsonschema from 4.22.0 to 4.23.0. ([\#17444](https://github.com/element-hq/synapse/issues/17444))
|
||||||
|
* Bump matrix-org/done-action from 2 to 3. ([\#17440](https://github.com/element-hq/synapse/issues/17440))
|
||||||
|
* Bump mypy from 1.9.0 to 1.10.1. ([\#17445](https://github.com/element-hq/synapse/issues/17445))
|
||||||
|
* Bump pyopenssl from 24.1.0 to 24.2.1. ([\#17465](https://github.com/element-hq/synapse/issues/17465))
|
||||||
|
* Bump ruff from 0.5.0 to 0.5.4. ([\#17466](https://github.com/element-hq/synapse/issues/17466))
|
||||||
|
* Bump sentry-sdk from 2.6.0 to 2.8.0. ([\#17456](https://github.com/element-hq/synapse/issues/17456))
|
||||||
|
* Bump sentry-sdk from 2.8.0 to 2.10.0. ([\#17467](https://github.com/element-hq/synapse/issues/17467))
|
||||||
|
* Bump setuptools from 67.6.0 to 70.0.0. ([\#17448](https://github.com/element-hq/synapse/issues/17448))
|
||||||
|
* Bump twine from 5.1.0 to 5.1.1. ([\#17443](https://github.com/element-hq/synapse/issues/17443))
|
||||||
|
* Bump types-jsonschema from 4.22.0.20240610 to 4.23.0.20240712. ([\#17446](https://github.com/element-hq/synapse/issues/17446))
|
||||||
|
* Bump ulid from 1.1.2 to 1.1.3. ([\#17442](https://github.com/element-hq/synapse/issues/17442))
|
||||||
|
* Bump zipp from 3.15.0 to 3.19.1. ([\#17427](https://github.com/element-hq/synapse/issues/17427))
|
||||||
|
|
||||||
|
|
||||||
|
# Synapse 1.111.1 (2024-07-30)
|
||||||
|
|
||||||
|
This security release is to update our locked dependency on Twisted to 24.7.0rc1, which includes a security fix for [CVE-2024-41671 / GHSA-c8m8-j448-xjx7: Disordered HTTP pipeline response in twisted.web, again](https://github.com/twisted/twisted/security/advisories/GHSA-c8m8-j448-xjx7).
|
||||||
|
|
||||||
|
This issue means that, if multiple HTTP requests are pipelined in the same TCP connection, Synapse can send responses to the wrong HTTP request.
|
||||||
|
If a reverse proxy was configured to use HTTP pipelining, this could result in responses being sent to the wrong user, severely harming confidentiality.
|
||||||
|
|
||||||
|
With that said, despite being a high severity issue, **we consider it unlikely that Synapse installations will be affected**.
|
||||||
|
The use of HTTP pipelining in this fashion would cause worse performance for clients (request-response latencies would be increased as users' responses would be artificially blocked behind other users' slow requests). Further, Nginx and Haproxy, two common reverse proxies, do not appear to support configuring their upstreams to use HTTP pipelining and thus would not be affected. For both of these reasons, we consider it unlikely that a Synapse deployment would be set up in such a configuration.
|
||||||
|
|
||||||
|
Despite that, we cannot rule out that some installations may exist with this unusual setup and so we are releasing this security update today.
|
||||||
|
|
||||||
|
**pip users:** Note that by default, upgrading Synapse using pip will not automatically upgrade Twisted. **Please manually install the new version of Twisted** using `pip install Twisted==24.7.0rc1`. Note also that even the `--upgrade-strategy=eager` flag to `pip install -U matrix-synapse` will not upgrade Twisted to a patched version because it is only a release candidate at this time.
|
||||||
|
|
||||||
|
|
||||||
|
### Internal Changes
|
||||||
|
|
||||||
|
- Upgrade locked dependency on Twisted to 24.7.0rc1. ([\#17502](https://github.com/element-hq/synapse/issues/17502))
|
||||||
|
|
||||||
|
|
||||||
|
# Synapse 1.111.0 (2024-07-16)
|
||||||
|
|
||||||
|
No significant changes since 1.111.0rc2.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Synapse 1.111.0rc2 (2024-07-10)
|
||||||
|
|
||||||
|
### Bugfixes
|
||||||
|
|
||||||
|
- Fix bug where using `synapse.app.media_repository` worker configuration would break the new media endpoints. ([\#17420](https://github.com/element-hq/synapse/issues/17420))
|
||||||
|
|
||||||
|
### Improved Documentation
|
||||||
|
|
||||||
|
- Document the new federation media worker endpoints in the [upgrade notes](https://element-hq.github.io/synapse/v1.111/upgrade.html) and [worker docs](https://element-hq.github.io/synapse/v1.111/workers.html). ([\#17421](https://github.com/element-hq/synapse/issues/17421))
|
||||||
|
|
||||||
|
### Internal Changes
|
||||||
|
|
||||||
|
- Route authenticated federation media requests to media repository workers in Complement tests. ([\#17422](https://github.com/element-hq/synapse/issues/17422))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Synapse 1.111.0rc1 (2024-07-09)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- Add `rooms` data to experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17320](https://github.com/element-hq/synapse/issues/17320))
|
||||||
|
- Add `room_types`/`not_room_types` filtering to experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17337](https://github.com/element-hq/synapse/issues/17337))
|
||||||
|
- Return "required state" in experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17342](https://github.com/element-hq/synapse/issues/17342))
|
||||||
|
- Support [MSC3916](https://github.com/matrix-org/matrix-spec-proposals/blob/main/proposals/3916-authentication-for-media.md) by adding [`_matrix/client/v1/media/download`](https://spec.matrix.org/v1.11/client-server-api/#get_matrixclientv1mediadownloadservernamemediaid) endpoint. ([\#17365](https://github.com/element-hq/synapse/issues/17365))
|
||||||
|
- Support [MSC3916](https://github.com/matrix-org/matrix-spec-proposals/blob/rav/authentication-for-media/proposals/3916-authentication-for-media.md)
|
||||||
|
by adding [`_matrix/client/v1/media/thumbnail`](https://spec.matrix.org/v1.11/client-server-api/#get_matrixclientv1mediathumbnailservernamemediaid), [`_matrix/federation/v1/media/thumbnail`](https://spec.matrix.org/v1.11/server-server-api/#get_matrixfederationv1mediathumbnailmediaid) endpoints and stabilizing the
|
||||||
|
remaining [`_matrix/client/v1/media`](https://spec.matrix.org/v1.11/client-server-api/#get_matrixclientv1mediaconfig) endpoints. ([\#17388](https://github.com/element-hq/synapse/issues/17388))
|
||||||
|
- Add `rooms.bump_stamp` for easier client-side sorting in experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17395](https://github.com/element-hq/synapse/issues/17395))
|
||||||
|
- Forget all of a user's rooms upon deactivation, preventing local room purges from being blocked on deactivated users. ([\#17400](https://github.com/element-hq/synapse/issues/17400))
|
||||||
|
- Declare support for [Matrix 1.11](https://matrix.org/blog/2024/06/20/matrix-v1.11-release/). ([\#17403](https://github.com/element-hq/synapse/issues/17403))
|
||||||
|
- [MSC3861](https://github.com/matrix-org/matrix-spec-proposals/pull/3861): allow overriding the introspection endpoint. ([\#17406](https://github.com/element-hq/synapse/issues/17406))
|
||||||
|
|
||||||
|
### Bugfixes
|
||||||
|
|
||||||
|
- Fix rare race which caused no new to-device messages to be received from remote server. ([\#17362](https://github.com/element-hq/synapse/issues/17362))
|
||||||
|
- Fix bug in experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint when using an old database. ([\#17398](https://github.com/element-hq/synapse/issues/17398))
|
||||||
|
|
||||||
|
### Improved Documentation
|
||||||
|
|
||||||
|
- Clarify that `url_preview_url_blacklist` is a usability feature. ([\#17356](https://github.com/element-hq/synapse/issues/17356))
|
||||||
|
- Fix broken links in README. ([\#17379](https://github.com/element-hq/synapse/issues/17379))
|
||||||
|
- Clarify that changelog content *and file extension* need to match in order for entries to merge. ([\#17399](https://github.com/element-hq/synapse/issues/17399))
|
||||||
|
|
||||||
|
### Internal Changes
|
||||||
|
|
||||||
|
- Make the release script create a release branch for Complement as well. ([\#17318](https://github.com/element-hq/synapse/issues/17318))
|
||||||
|
- Fix uploading packages to PyPi. ([\#17363](https://github.com/element-hq/synapse/issues/17363))
|
||||||
|
- Add CI check for the README. ([\#17367](https://github.com/element-hq/synapse/issues/17367))
|
||||||
|
- Fix linting errors from new `ruff` version. ([\#17381](https://github.com/element-hq/synapse/issues/17381), [\#17411](https://github.com/element-hq/synapse/issues/17411))
|
||||||
|
- Fix building debian packages on non-clean checkouts. ([\#17390](https://github.com/element-hq/synapse/issues/17390))
|
||||||
|
- Finish up work to allow per-user feature flags. ([\#17392](https://github.com/element-hq/synapse/issues/17392), [\#17410](https://github.com/element-hq/synapse/issues/17410))
|
||||||
|
- Allow enabling sliding sync per-user. ([\#17393](https://github.com/element-hq/synapse/issues/17393))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Updates to locked dependencies
|
||||||
|
|
||||||
|
* Bump certifi from 2023.7.22 to 2024.7.4. ([\#17404](https://github.com/element-hq/synapse/issues/17404))
|
||||||
|
* Bump cryptography from 42.0.7 to 42.0.8. ([\#17382](https://github.com/element-hq/synapse/issues/17382))
|
||||||
|
* Bump ijson from 3.2.3 to 3.3.0. ([\#17413](https://github.com/element-hq/synapse/issues/17413))
|
||||||
|
* Bump log from 0.4.21 to 0.4.22. ([\#17384](https://github.com/element-hq/synapse/issues/17384))
|
||||||
|
* Bump mypy-zope from 1.0.4 to 1.0.5. ([\#17414](https://github.com/element-hq/synapse/issues/17414))
|
||||||
|
* Bump pillow from 10.3.0 to 10.4.0. ([\#17412](https://github.com/element-hq/synapse/issues/17412))
|
||||||
|
* Bump pydantic from 2.7.1 to 2.8.2. ([\#17415](https://github.com/element-hq/synapse/issues/17415))
|
||||||
|
* Bump ruff from 0.3.7 to 0.5.0. ([\#17381](https://github.com/element-hq/synapse/issues/17381))
|
||||||
|
* Bump serde from 1.0.203 to 1.0.204. ([\#17409](https://github.com/element-hq/synapse/issues/17409))
|
||||||
|
* Bump serde_json from 1.0.117 to 1.0.120. ([\#17385](https://github.com/element-hq/synapse/issues/17385), [\#17408](https://github.com/element-hq/synapse/issues/17408))
|
||||||
|
* Bump types-setuptools from 69.5.0.20240423 to 70.1.0.20240627. ([\#17380](https://github.com/element-hq/synapse/issues/17380))
|
||||||
|
|
||||||
|
# Synapse 1.110.0 (2024-07-03)
|
||||||
|
|
||||||
|
No significant changes since 1.110.0rc3.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Synapse 1.110.0rc3 (2024-07-02)
|
||||||
|
|
||||||
|
### Bugfixes
|
||||||
|
|
||||||
|
- Fix bug where `/sync` requests could get blocked indefinitely after an upgrade from Synapse versions before v1.109.0. ([\#17386](https://github.com/element-hq/synapse/issues/17386), [\#17391](https://github.com/element-hq/synapse/issues/17391))
|
||||||
|
|
||||||
|
### Internal Changes
|
||||||
|
|
||||||
|
- Limit size of presence EDUs to 50 entries. ([\#17371](https://github.com/element-hq/synapse/issues/17371))
|
||||||
|
- Fix building debian package for debian sid. ([\#17389](https://github.com/element-hq/synapse/issues/17389))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Synapse 1.110.0rc2 (2024-06-26)
|
||||||
|
|
||||||
|
### Internal Changes
|
||||||
|
|
||||||
|
- Fix uploading packages to PyPi. ([\#17363](https://github.com/element-hq/synapse/issues/17363))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Synapse 1.110.0rc1 (2024-06-26)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- Add initial implementation of an experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17187](https://github.com/element-hq/synapse/issues/17187))
|
||||||
|
- Add experimental support for [MSC3823](https://github.com/matrix-org/matrix-spec-proposals/pull/3823) - Account suspension. ([\#17255](https://github.com/element-hq/synapse/issues/17255))
|
||||||
|
- Improve ratelimiting in Synapse. ([\#17256](https://github.com/element-hq/synapse/issues/17256))
|
||||||
|
- Add support for the unstable [MSC4151](https://github.com/matrix-org/matrix-spec-proposals/pull/4151) report room API. ([\#17270](https://github.com/element-hq/synapse/issues/17270), [\#17296](https://github.com/element-hq/synapse/issues/17296))
|
||||||
|
- Filter for public and empty rooms added to Admin-API [List Room API](https://element-hq.github.io/synapse/latest/admin_api/rooms.html#list-room-api). ([\#17276](https://github.com/element-hq/synapse/issues/17276))
|
||||||
|
- Add `is_dm` filtering to experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17277](https://github.com/element-hq/synapse/issues/17277))
|
||||||
|
- Add `is_encrypted` filtering to experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17281](https://github.com/element-hq/synapse/issues/17281))
|
||||||
|
- Include user membership in events served to clients, per [MSC4115](https://github.com/matrix-org/matrix-spec-proposals/pull/4115). ([\#17282](https://github.com/element-hq/synapse/issues/17282))
|
||||||
|
- Do not require user-interactive authentication for uploading cross-signing keys for the first time, per [MSC3967](https://github.com/matrix-org/matrix-spec-proposals/pull/3967). ([\#17284](https://github.com/element-hq/synapse/issues/17284))
|
||||||
|
- Add `stream_ordering` sort to experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17293](https://github.com/element-hq/synapse/issues/17293))
|
||||||
|
- `register_new_matrix_user` now supports a --password-file flag, which
|
||||||
|
is useful for scripting. ([\#17294](https://github.com/element-hq/synapse/issues/17294))
|
||||||
|
- `register_new_matrix_user` now supports a --exists-ok flag to allow registration of users that already exist in the database.
|
||||||
|
This is useful for scripts that bootstrap user accounts with initial passwords. ([\#17304](https://github.com/element-hq/synapse/issues/17304))
|
||||||
|
- Add support for via query parameter from [MSC4156](https://github.com/matrix-org/matrix-spec-proposals/pull/4156). ([\#17322](https://github.com/element-hq/synapse/issues/17322))
|
||||||
|
- Add `is_invite` filtering to experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17335](https://github.com/element-hq/synapse/issues/17335))
|
||||||
|
- Support [MSC3916](https://github.com/matrix-org/matrix-spec-proposals/blob/main/proposals/3916-authentication-for-media.md) by adding a federation /download endpoint. ([\#17350](https://github.com/element-hq/synapse/issues/17350))
|
||||||
|
|
||||||
|
### Bugfixes
|
||||||
|
|
||||||
|
- Fix searching for users with their exact localpart whose ID includes a hyphen. ([\#17254](https://github.com/element-hq/synapse/issues/17254))
|
||||||
|
- Fix wrong retention policy being used when filtering events. ([\#17272](https://github.com/element-hq/synapse/issues/17272))
|
||||||
|
- Fix bug where OTKs were not always included in `/sync` response when using workers. ([\#17275](https://github.com/element-hq/synapse/issues/17275))
|
||||||
|
- Fix a long-standing bug where an invalid 'from' parameter to [`/notifications`](https://spec.matrix.org/v1.10/client-server-api/#get_matrixclientv3notifications) would result in an Internal Server Error. ([\#17283](https://github.com/element-hq/synapse/issues/17283))
|
||||||
|
- Fix edge case in `/sync` returning the wrong the state when using sharded event persisters. ([\#17295](https://github.com/element-hq/synapse/issues/17295))
|
||||||
|
- Add initial implementation of an experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint. ([\#17301](https://github.com/element-hq/synapse/issues/17301))
|
||||||
|
- Fix email notification subject when invited to a space. ([\#17336](https://github.com/element-hq/synapse/issues/17336))
|
||||||
|
|
||||||
|
### Improved Documentation
|
||||||
|
|
||||||
|
- Add missing quotes for example for `exclude_rooms_from_sync`. ([\#17308](https://github.com/element-hq/synapse/issues/17308))
|
||||||
|
- Update header in the README to visually fix the the auto-generated table of contents. ([\#17329](https://github.com/element-hq/synapse/issues/17329))
|
||||||
|
- Fix stale references to the Foundation's Security Disclosure Policy. ([\#17341](https://github.com/element-hq/synapse/issues/17341))
|
||||||
|
- Add default values for `rc_invites.per_issuer` to docs. ([\#17347](https://github.com/element-hq/synapse/issues/17347))
|
||||||
|
- Fix an error in the docs for `search_all_users` parameter under `user_directory`. ([\#17348](https://github.com/element-hq/synapse/issues/17348))
|
||||||
|
|
||||||
|
### Internal Changes
|
||||||
|
|
||||||
|
- Remove unused `expire_access_token` option in the Synapse Docker config file. Contributed by @AaronDewes. ([\#17198](https://github.com/element-hq/synapse/issues/17198))
|
||||||
|
- Use fully-qualified `PersistedEventPosition` when returning `RoomsForUser` to facilitate proper comparisons and `RoomStreamToken` generation. ([\#17265](https://github.com/element-hq/synapse/issues/17265))
|
||||||
|
- Add debug logging for when room keys are uploaded, including whether they are replacing other room keys. ([\#17266](https://github.com/element-hq/synapse/issues/17266))
|
||||||
|
- Handle OTK uploads off master. ([\#17271](https://github.com/element-hq/synapse/issues/17271))
|
||||||
|
- Don't try and resync devices for remote users whose servers are marked as down. ([\#17273](https://github.com/element-hq/synapse/issues/17273))
|
||||||
|
- Re-organize Pydantic models and types used in handlers. ([\#17279](https://github.com/element-hq/synapse/issues/17279))
|
||||||
|
- Expose the worker instance that persisted the event on `event.internal_metadata.instance_name`. ([\#17300](https://github.com/element-hq/synapse/issues/17300))
|
||||||
|
- Update the README with Element branding, improve headers and fix the #synapse:matrix.org support room link rendering. ([\#17324](https://github.com/element-hq/synapse/issues/17324))
|
||||||
|
- Change path of the experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync implementation to `/org.matrix.simplified_msc3575/sync` since our simplified API is slightly incompatible with what's in the current MSC. ([\#17331](https://github.com/element-hq/synapse/issues/17331))
|
||||||
|
- Handle device lists notifications for large accounts more efficiently in worker mode. ([\#17333](https://github.com/element-hq/synapse/issues/17333), [\#17358](https://github.com/element-hq/synapse/issues/17358))
|
||||||
|
- Do not block event sending/receiving while calculating large event auth chains. ([\#17338](https://github.com/element-hq/synapse/issues/17338))
|
||||||
|
- Tidy up `parse_integer` docs and call sites to reflect the fact that they require non-negative integers by default, and bring `parse_integer_from_args` default in alignment. Contributed by Denis Kasak (@dkasak). ([\#17339](https://github.com/element-hq/synapse/issues/17339))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Updates to locked dependencies
|
||||||
|
|
||||||
|
* Bump authlib from 1.3.0 to 1.3.1. ([\#17343](https://github.com/element-hq/synapse/issues/17343))
|
||||||
|
* Bump dawidd6/action-download-artifact from 3.1.4 to 5. ([\#17289](https://github.com/element-hq/synapse/issues/17289))
|
||||||
|
* Bump dawidd6/action-download-artifact from 5 to 6. ([\#17313](https://github.com/element-hq/synapse/issues/17313))
|
||||||
|
* Bump docker/build-push-action from 5 to 6. ([\#17312](https://github.com/element-hq/synapse/issues/17312))
|
||||||
|
* Bump jinja2 from 3.1.3 to 3.1.4. ([\#17287](https://github.com/element-hq/synapse/issues/17287))
|
||||||
|
* Bump lazy_static from 1.4.0 to 1.5.0. ([\#17355](https://github.com/element-hq/synapse/issues/17355))
|
||||||
|
* Bump msgpack from 1.0.7 to 1.0.8. ([\#17317](https://github.com/element-hq/synapse/issues/17317))
|
||||||
|
* Bump netaddr from 1.2.1 to 1.3.0. ([\#17353](https://github.com/element-hq/synapse/issues/17353))
|
||||||
|
* Bump packaging from 24.0 to 24.1. ([\#17352](https://github.com/element-hq/synapse/issues/17352))
|
||||||
|
* Bump phonenumbers from 8.13.37 to 8.13.39. ([\#17315](https://github.com/element-hq/synapse/issues/17315))
|
||||||
|
* Bump regex from 1.10.4 to 1.10.5. ([\#17290](https://github.com/element-hq/synapse/issues/17290))
|
||||||
|
* Bump requests from 2.31.0 to 2.32.2. ([\#17345](https://github.com/element-hq/synapse/issues/17345))
|
||||||
|
* Bump sentry-sdk from 2.1.1 to 2.3.1. ([\#17263](https://github.com/element-hq/synapse/issues/17263))
|
||||||
|
* Bump sentry-sdk from 2.3.1 to 2.6.0. ([\#17351](https://github.com/element-hq/synapse/issues/17351))
|
||||||
|
* Bump tornado from 6.4 to 6.4.1. ([\#17344](https://github.com/element-hq/synapse/issues/17344))
|
||||||
|
* Bump mypy from 1.8.0 to 1.9.0. ([\#17297](https://github.com/element-hq/synapse/issues/17297))
|
||||||
|
* Bump types-jsonschema from 4.21.0.20240311 to 4.22.0.20240610. ([\#17288](https://github.com/element-hq/synapse/issues/17288))
|
||||||
|
* Bump types-netaddr from 1.2.0.20240219 to 1.3.0.20240530. ([\#17314](https://github.com/element-hq/synapse/issues/17314))
|
||||||
|
* Bump types-pillow from 10.2.0.20240423 to 10.2.0.20240520. ([\#17285](https://github.com/element-hq/synapse/issues/17285))
|
||||||
|
* Bump types-pyyaml from 6.0.12.12 to 6.0.12.20240311. ([\#17316](https://github.com/element-hq/synapse/issues/17316))
|
||||||
|
* Bump typing-extensions from 4.11.0 to 4.12.2. ([\#17354](https://github.com/element-hq/synapse/issues/17354))
|
||||||
|
* Bump urllib3 from 2.0.7 to 2.2.2. ([\#17346](https://github.com/element-hq/synapse/issues/17346))
|
||||||
|
|
||||||
|
# Synapse 1.109.0 (2024-06-18)
|
||||||
|
|
||||||
|
### Internal Changes
|
||||||
|
|
||||||
|
- Fix the building of binary wheels for macOS by switching to macOS 12 CI runners. ([\#17319](https://github.com/element-hq/synapse/issues/17319))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Synapse 1.109.0rc3 (2024-06-17)
|
||||||
|
|
||||||
|
### Bugfixes
|
||||||
|
|
||||||
|
- When rolling back to a previous Synapse version and then forwards again to this release, don't require server operators to manually run SQL. ([\#17305](https://github.com/element-hq/synapse/issues/17305), [\#17309](https://github.com/element-hq/synapse/issues/17309))
|
||||||
|
|
||||||
|
### Internal Changes
|
||||||
|
|
||||||
|
- Use the release branch for sytest in release-branch PRs. ([\#17306](https://github.com/element-hq/synapse/issues/17306))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Synapse 1.109.0rc2 (2024-06-11)
|
||||||
|
|
||||||
|
### Bugfixes
|
||||||
|
|
||||||
|
- Fix bug where one-time-keys were not always included in `/sync` response when using workers. Introduced in v1.109.0rc1. ([\#17275](https://github.com/element-hq/synapse/issues/17275))
|
||||||
|
- Fix bug where `/sync` could get stuck due to edge case in device lists handling. Introduced in v1.109.0rc1. ([\#17292](https://github.com/element-hq/synapse/issues/17292))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Synapse 1.109.0rc1 (2024-06-04)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- Add the ability to auto-accept invites on the behalf of users. See the [`auto_accept_invites`](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html#auto-accept-invites) config option for details. ([\#17147](https://github.com/element-hq/synapse/issues/17147))
|
||||||
|
- Add experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync/e2ee` endpoint for to-device messages and device encryption info. ([\#17167](https://github.com/element-hq/synapse/issues/17167))
|
||||||
|
- Support [MSC3916](https://github.com/matrix-org/matrix-spec-proposals/issues/3916) by adding unstable media endpoints to `/_matrix/client`. ([\#17213](https://github.com/element-hq/synapse/issues/17213))
|
||||||
|
- Add logging to tasks managed by the task scheduler, showing CPU and database usage. ([\#17219](https://github.com/element-hq/synapse/issues/17219))
|
||||||
|
|
||||||
|
### Bugfixes
|
||||||
|
|
||||||
|
- Fix deduplicating of membership events to not create unused state groups. ([\#17164](https://github.com/element-hq/synapse/issues/17164))
|
||||||
|
- Fix bug where duplicate events could be sent down sync when using workers that are overloaded. ([\#17215](https://github.com/element-hq/synapse/issues/17215))
|
||||||
|
- Ignore attempts to send to-device messages to bad users, to avoid log spam when we try to connect to the bad server. ([\#17240](https://github.com/element-hq/synapse/issues/17240))
|
||||||
|
- Fix handling of duplicate concurrent uploading of device one-time-keys. ([\#17241](https://github.com/element-hq/synapse/issues/17241))
|
||||||
|
- Fix reporting of default tags to Sentry, such as worker name. Broke in v1.108.0. ([\#17251](https://github.com/element-hq/synapse/issues/17251))
|
||||||
|
- Fix bug where typing updates would not be sent when using workers after a restart. ([\#17252](https://github.com/element-hq/synapse/issues/17252))
|
||||||
|
|
||||||
|
### Improved Documentation
|
||||||
|
|
||||||
|
- Update the LemonLDAP documentation to say that claims should be explicitly included in the returned `id_token`, as Synapse won't request them. ([\#17204](https://github.com/element-hq/synapse/issues/17204))
|
||||||
|
|
||||||
|
### Internal Changes
|
||||||
|
|
||||||
|
- Improve DB usage when fetching related events. ([\#17083](https://github.com/element-hq/synapse/issues/17083))
|
||||||
|
- Log exceptions when failing to auto-join new user according to the `auto_join_rooms` option. ([\#17176](https://github.com/element-hq/synapse/issues/17176))
|
||||||
|
- Reduce work of calculating outbound device lists updates. ([\#17211](https://github.com/element-hq/synapse/issues/17211))
|
||||||
|
- Improve performance of calculating device lists changes in `/sync`. ([\#17216](https://github.com/element-hq/synapse/issues/17216))
|
||||||
|
- Move towards using `MultiWriterIdGenerator` everywhere. ([\#17226](https://github.com/element-hq/synapse/issues/17226))
|
||||||
|
- Replaces all usages of `StreamIdGenerator` with `MultiWriterIdGenerator`. ([\#17229](https://github.com/element-hq/synapse/issues/17229))
|
||||||
|
- Change the `allow_unsafe_locale` config option to also apply when setting up new databases. ([\#17238](https://github.com/element-hq/synapse/issues/17238))
|
||||||
|
- Fix errors in logs about closing incorrect logging contexts when media gets rejected by a module. ([\#17239](https://github.com/element-hq/synapse/issues/17239), [\#17246](https://github.com/element-hq/synapse/issues/17246))
|
||||||
|
- Clean out invalid destinations from `device_federation_outbox` table. ([\#17242](https://github.com/element-hq/synapse/issues/17242))
|
||||||
|
- Stop logging errors when receiving invalid User IDs in key querys requests. ([\#17250](https://github.com/element-hq/synapse/issues/17250))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Updates to locked dependencies
|
||||||
|
|
||||||
|
* Bump anyhow from 1.0.83 to 1.0.86. ([\#17220](https://github.com/element-hq/synapse/issues/17220))
|
||||||
|
* Bump bcrypt from 4.1.2 to 4.1.3. ([\#17224](https://github.com/element-hq/synapse/issues/17224))
|
||||||
|
* Bump lxml from 5.2.1 to 5.2.2. ([\#17261](https://github.com/element-hq/synapse/issues/17261))
|
||||||
|
* Bump mypy-zope from 1.0.3 to 1.0.4. ([\#17262](https://github.com/element-hq/synapse/issues/17262))
|
||||||
|
* Bump phonenumbers from 8.13.35 to 8.13.37. ([\#17235](https://github.com/element-hq/synapse/issues/17235))
|
||||||
|
* Bump prometheus-client from 0.19.0 to 0.20.0. ([\#17233](https://github.com/element-hq/synapse/issues/17233))
|
||||||
|
* Bump pyasn1 from 0.5.1 to 0.6.0. ([\#17223](https://github.com/element-hq/synapse/issues/17223))
|
||||||
|
* Bump pyicu from 2.13 to 2.13.1. ([\#17236](https://github.com/element-hq/synapse/issues/17236))
|
||||||
|
* Bump pyopenssl from 24.0.0 to 24.1.0. ([\#17234](https://github.com/element-hq/synapse/issues/17234))
|
||||||
|
* Bump serde from 1.0.201 to 1.0.202. ([\#17221](https://github.com/element-hq/synapse/issues/17221))
|
||||||
|
* Bump serde from 1.0.202 to 1.0.203. ([\#17232](https://github.com/element-hq/synapse/issues/17232))
|
||||||
|
* Bump twine from 5.0.0 to 5.1.0. ([\#17225](https://github.com/element-hq/synapse/issues/17225))
|
||||||
|
* Bump types-psycopg2 from 2.9.21.20240311 to 2.9.21.20240417. ([\#17222](https://github.com/element-hq/synapse/issues/17222))
|
||||||
|
* Bump types-pyopenssl from 24.0.0.20240311 to 24.1.0.20240425. ([\#17260](https://github.com/element-hq/synapse/issues/17260))
|
||||||
|
|
||||||
|
# Synapse 1.108.0 (2024-05-28)
|
||||||
|
|
||||||
|
No significant changes since 1.108.0rc1.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Synapse 1.108.0rc1 (2024-05-21)
|
# Synapse 1.108.0rc1 (2024-05-21)
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
33
Cargo.lock
generated
33
Cargo.lock
generated
@@ -67,9 +67,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bytes"
|
name = "bytes"
|
||||||
version = "1.6.0"
|
version = "1.7.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9"
|
checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cfg-if"
|
name = "cfg-if"
|
||||||
@@ -212,9 +212,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lazy_static"
|
name = "lazy_static"
|
||||||
version = "1.4.0"
|
version = "1.5.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
@@ -234,9 +234,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log"
|
name = "log"
|
||||||
version = "0.4.21"
|
version = "0.4.22"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
|
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memchr"
|
name = "memchr"
|
||||||
@@ -444,9 +444,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex"
|
name = "regex"
|
||||||
version = "1.10.4"
|
version = "1.10.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c"
|
checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick",
|
"aho-corasick",
|
||||||
"memchr",
|
"memchr",
|
||||||
@@ -485,18 +485,18 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.202"
|
version = "1.0.209"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395"
|
checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.202"
|
version = "1.0.209"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838"
|
checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -505,11 +505,12 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_json"
|
name = "serde_json"
|
||||||
version = "1.0.117"
|
version = "1.0.127"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3"
|
checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itoa",
|
"itoa",
|
||||||
|
"memchr",
|
||||||
"ryu",
|
"ryu",
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
@@ -597,9 +598,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ulid"
|
name = "ulid"
|
||||||
version = "1.1.2"
|
version = "1.1.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "34778c17965aa2a08913b57e1f34db9b4a63f5de31768b55bf20d2795f921259"
|
checksum = "04f903f293d11f31c0c29e4148f6dc0d033a7f80cebc0282bea147611667d289"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"getrandom",
|
"getrandom",
|
||||||
"rand",
|
"rand",
|
||||||
|
|||||||
71
README.rst
71
README.rst
@@ -1,21 +1,34 @@
|
|||||||
=========================================================================
|
.. image:: ./docs/element_logo_white_bg.svg
|
||||||
Synapse |support| |development| |documentation| |license| |pypi| |python|
|
:height: 60px
|
||||||
=========================================================================
|
|
||||||
|
|
||||||
Synapse is an open-source `Matrix <https://matrix.org/>`_ homeserver written and
|
**Element Synapse - Matrix homeserver implementation**
|
||||||
maintained by the Matrix.org Foundation. We began rapid development in 2014,
|
|
||||||
reaching v1.0.0 in 2019. Development on Synapse and the Matrix protocol itself continues
|
|
||||||
in earnest today.
|
|
||||||
|
|
||||||
Briefly, Matrix is an open standard for communications on the internet, supporting
|
|support| |development| |documentation| |license| |pypi| |python|
|
||||||
federation, encryption and VoIP. Matrix.org has more to say about the `goals of the
|
|
||||||
Matrix project <https://matrix.org/docs/guides/introduction>`_, and the `formal specification
|
Synapse is an open source `Matrix <https://matrix.org>`__ homeserver
|
||||||
<https://spec.matrix.org/>`_ describes the technical details.
|
implementation, written and maintained by `Element <https://element.io>`_.
|
||||||
|
`Matrix <https://github.com/matrix-org>`__ is the open standard for
|
||||||
|
secure and interoperable real time communications. You can directly run
|
||||||
|
and manage the source code in this repository, available under an AGPL
|
||||||
|
license. There is no support provided from Element unless you have a
|
||||||
|
subscription.
|
||||||
|
|
||||||
|
Subscription alternative
|
||||||
|
========================
|
||||||
|
|
||||||
|
Alternatively, for those that need an enterprise-ready solution, Element
|
||||||
|
Server Suite (ESS) is `available as a subscription <https://element.io/pricing>`_.
|
||||||
|
ESS builds on Synapse to offer a complete Matrix-based backend including the full
|
||||||
|
`Admin Console product <https://element.io/enterprise-functionality/admin-console>`_,
|
||||||
|
giving admins the power to easily manage an organization-wide
|
||||||
|
deployment. It includes advanced identity management, auditing,
|
||||||
|
moderation and data retention options as well as Long Term Support and
|
||||||
|
SLAs. ESS can be used to support any Matrix-based frontend client.
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
Installing and configuration
|
🛠️ Installing and configuration
|
||||||
============================
|
===============================
|
||||||
|
|
||||||
The Synapse documentation describes `how to install Synapse <https://element-hq.github.io/synapse/latest/setup/installation.html>`_. We recommend using
|
The Synapse documentation describes `how to install Synapse <https://element-hq.github.io/synapse/latest/setup/installation.html>`_. We recommend using
|
||||||
`Docker images <https://element-hq.github.io/synapse/latest/setup/installation.html#docker-images-and-ansible-playbooks>`_ or `Debian packages from Matrix.org
|
`Docker images <https://element-hq.github.io/synapse/latest/setup/installation.html#docker-images-and-ansible-playbooks>`_ or `Debian packages from Matrix.org
|
||||||
@@ -105,8 +118,8 @@ Following this advice ensures that even if an XSS is found in Synapse, the
|
|||||||
impact to other applications will be minimal.
|
impact to other applications will be minimal.
|
||||||
|
|
||||||
|
|
||||||
Testing a new installation
|
🧪 Testing a new installation
|
||||||
==========================
|
=============================
|
||||||
|
|
||||||
The easiest way to try out your new Synapse installation is by connecting to it
|
The easiest way to try out your new Synapse installation is by connecting to it
|
||||||
from a web client.
|
from a web client.
|
||||||
@@ -159,8 +172,20 @@ the form of::
|
|||||||
As when logging in, you will need to specify a "Custom server". Specify your
|
As when logging in, you will need to specify a "Custom server". Specify your
|
||||||
desired ``localpart`` in the 'User name' box.
|
desired ``localpart`` in the 'User name' box.
|
||||||
|
|
||||||
Troubleshooting and support
|
🎯 Troubleshooting and support
|
||||||
===========================
|
==============================
|
||||||
|
|
||||||
|
🚀 Professional support
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
Enterprise quality support for Synapse including SLAs is available as part of an
|
||||||
|
`Element Server Suite (ESS) <https://element.io/pricing>`_ subscription.
|
||||||
|
|
||||||
|
If you are an existing ESS subscriber then you can raise a `support request <https://ems.element.io/support>`_
|
||||||
|
and access the `knowledge base <https://ems-docs.element.io>`_.
|
||||||
|
|
||||||
|
🤝 Community support
|
||||||
|
--------------------
|
||||||
|
|
||||||
The `Admin FAQ <https://element-hq.github.io/synapse/latest/usage/administration/admin_faq.html>`_
|
The `Admin FAQ <https://element-hq.github.io/synapse/latest/usage/administration/admin_faq.html>`_
|
||||||
includes tips on dealing with some common problems. For more details, see
|
includes tips on dealing with some common problems. For more details, see
|
||||||
@@ -176,8 +201,8 @@ issues for support requests, only for bug reports and feature requests.
|
|||||||
.. |docs| replace:: ``docs``
|
.. |docs| replace:: ``docs``
|
||||||
.. _docs: docs
|
.. _docs: docs
|
||||||
|
|
||||||
Identity Servers
|
🪪 Identity Servers
|
||||||
================
|
===================
|
||||||
|
|
||||||
Identity servers have the job of mapping email addresses and other 3rd Party
|
Identity servers have the job of mapping email addresses and other 3rd Party
|
||||||
IDs (3PIDs) to Matrix user IDs, as well as verifying the ownership of 3PIDs
|
IDs (3PIDs) to Matrix user IDs, as well as verifying the ownership of 3PIDs
|
||||||
@@ -206,8 +231,8 @@ an email address with your account, or send an invite to another user via their
|
|||||||
email address.
|
email address.
|
||||||
|
|
||||||
|
|
||||||
Development
|
🛠️ Development
|
||||||
===========
|
==============
|
||||||
|
|
||||||
We welcome contributions to Synapse from the community!
|
We welcome contributions to Synapse from the community!
|
||||||
The best place to get started is our
|
The best place to get started is our
|
||||||
@@ -225,8 +250,8 @@ Alongside all that, join our developer community on Matrix:
|
|||||||
`#synapse-dev:matrix.org <https://matrix.to/#/#synapse-dev:matrix.org>`_, featuring real humans!
|
`#synapse-dev:matrix.org <https://matrix.to/#/#synapse-dev:matrix.org>`_, featuring real humans!
|
||||||
|
|
||||||
|
|
||||||
.. |support| image:: https://img.shields.io/matrix/synapse:matrix.org?label=support&logo=matrix
|
.. |support| image:: https://img.shields.io/badge/matrix-community%20support-success
|
||||||
:alt: (get support on #synapse:matrix.org)
|
:alt: (get community support in #synapse:matrix.org)
|
||||||
:target: https://matrix.to/#/#synapse:matrix.org
|
:target: https://matrix.to/#/#synapse:matrix.org
|
||||||
|
|
||||||
.. |development| image:: https://img.shields.io/matrix/synapse-dev:matrix.org?label=development&logo=matrix
|
.. |development| image:: https://img.shields.io/matrix/synapse-dev:matrix.org?label=development&logo=matrix
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
Add the ability to auto-accept invites on the behalf of users. See the [`auto_accept_invites`](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html#auto-accept-invites) config option for details.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Update OIDC documentation: by default Matrix doesn't query userinfo endpoint, then claims should be put on id_token.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Reduce work of calculating outbound device lists updates.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Improve performance of calculating device lists changes in `/sync`.
|
|
||||||
1
changelog.d/17407.misc
Normal file
1
changelog.d/17407.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
MSC3861: load the issuer and account management URLs from OIDC discovery.
|
||||||
1
changelog.d/17509.feature
Normal file
1
changelog.d/17509.feature
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Improve cross-signing upload when using [MSC3861](https://github.com/matrix-org/matrix-spec-proposals/pull/3861) to use a custom UIA flow stage, with web fallback support.
|
||||||
1
changelog.d/17512.misc
Normal file
1
changelog.d/17512.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Pre-populate room data used in experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint for quick filtering/sorting.
|
||||||
1
changelog.d/17590.doc
Normal file
1
changelog.d/17590.doc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Clarify that the admin api resource is only loaded on the main process and not workers.
|
||||||
1
changelog.d/17594.doc
Normal file
1
changelog.d/17594.doc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fixed typo in `saml2_config` config [example](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html#saml2_config).
|
||||||
1
changelog.d/17599.misc
Normal file
1
changelog.d/17599.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Store sliding sync per-connection state in the database.
|
||||||
1
changelog.d/17600.misc
Normal file
1
changelog.d/17600.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Make the sliding sync `PerConnectionState` class immutable.
|
||||||
1
changelog.d/17607.bugfix
Normal file
1
changelog.d/17607.bugfix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Return `400 M_BAD_JSON` upon attempting to complete various room actions with a non-local user ID and unknown room ID, rather than an internal server error.
|
||||||
1
changelog.d/17620.misc
Normal file
1
changelog.d/17620.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Replace `isort` and `black with `ruff`.
|
||||||
1
changelog.d/17626.bugfix
Normal file
1
changelog.d/17626.bugfix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fix authenticated media responses using a wrong limit when following redirects over federation.
|
||||||
1
changelog.d/17629.misc
Normal file
1
changelog.d/17629.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Sliding Sync: Split up `get_room_membership_for_user_at_to_token`.
|
||||||
1
changelog.d/17630.misc
Normal file
1
changelog.d/17630.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Use new database tables for sliding sync.
|
||||||
1
changelog.d/17631.misc
Normal file
1
changelog.d/17631.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Store sliding sync per-connection state in the database.
|
||||||
1
changelog.d/17632.misc
Normal file
1
changelog.d/17632.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Pre-populate room data used in experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint for quick filtering/sorting.
|
||||||
1
changelog.d/17633.misc
Normal file
1
changelog.d/17633.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Pre-populate room data used in experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint for quick filtering/sorting.
|
||||||
1
changelog.d/17634.misc
Normal file
1
changelog.d/17634.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Pre-populate room data used in experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint for quick filtering/sorting.
|
||||||
1
changelog.d/17635.misc
Normal file
1
changelog.d/17635.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Pre-populate room data used in experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint for quick filtering/sorting.
|
||||||
1
changelog.d/17636.misc
Normal file
1
changelog.d/17636.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Pre-populate room data used in experimental [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) Sliding Sync `/sync` endpoint for quick filtering/sorting.
|
||||||
1
changelog.d/17643.misc
Normal file
1
changelog.d/17643.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Replace `isort` and `black with `ruff`.
|
||||||
1
changelog.d/17661.bugfix
Normal file
1
changelog.d/17661.bugfix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Make sure we advertise registration as disabled when MSC3861 is enabled.
|
||||||
@@ -21,7 +21,8 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
""" Starts a synapse client console. """
|
"""Starts a synapse client console."""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import binascii
|
import binascii
|
||||||
import cmd
|
import cmd
|
||||||
|
|||||||
127
debian/changelog
vendored
127
debian/changelog
vendored
@@ -1,3 +1,130 @@
|
|||||||
|
matrix-synapse-py3 (1.114.0) stable; urgency=medium
|
||||||
|
|
||||||
|
* New Synapse release 1.114.0.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Mon, 02 Sep 2024 15:14:53 +0100
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.114.0~rc3) stable; urgency=medium
|
||||||
|
|
||||||
|
* New Synapse release 1.114.0rc3.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Fri, 30 Aug 2024 16:38:05 +0100
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.114.0~rc2) stable; urgency=medium
|
||||||
|
|
||||||
|
* New Synapse release 1.114.0rc2.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Fri, 30 Aug 2024 15:35:13 +0100
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.114.0~rc1) stable; urgency=medium
|
||||||
|
|
||||||
|
* New synapse release 1.114.0rc1.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Tue, 20 Aug 2024 12:55:28 +0000
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.113.0) stable; urgency=medium
|
||||||
|
|
||||||
|
* New Synapse release 1.113.0.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Tue, 13 Aug 2024 14:36:56 +0100
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.113.0~rc1) stable; urgency=medium
|
||||||
|
|
||||||
|
* New Synapse release 1.113.0rc1.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Tue, 06 Aug 2024 12:23:23 +0100
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.112.0) stable; urgency=medium
|
||||||
|
|
||||||
|
* New Synapse release 1.112.0.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Tue, 30 Jul 2024 17:15:48 +0100
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.112.0~rc1) stable; urgency=medium
|
||||||
|
|
||||||
|
* New Synapse release 1.112.0rc1.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Tue, 23 Jul 2024 08:58:55 -0600
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.111.1) stable; urgency=medium
|
||||||
|
|
||||||
|
* New Synapse release 1.111.1.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Tue, 30 Jul 2024 16:13:52 +0100
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.111.0) stable; urgency=medium
|
||||||
|
|
||||||
|
* New Synapse release 1.111.0.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Tue, 16 Jul 2024 12:42:46 +0200
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.111.0~rc2) stable; urgency=medium
|
||||||
|
|
||||||
|
* New synapse release 1.111.0rc2.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Wed, 10 Jul 2024 08:46:54 +0000
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.111.0~rc1) stable; urgency=medium
|
||||||
|
|
||||||
|
* New synapse release 1.111.0rc1.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Tue, 09 Jul 2024 09:49:25 +0000
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.110.0) stable; urgency=medium
|
||||||
|
|
||||||
|
* New Synapse release 1.110.0.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Wed, 03 Jul 2024 09:08:59 -0600
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.110.0~rc3) stable; urgency=medium
|
||||||
|
|
||||||
|
* New Synapse release 1.110.0rc3.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Tue, 02 Jul 2024 08:28:56 -0600
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.110.0~rc2) stable; urgency=medium
|
||||||
|
|
||||||
|
* New Synapse release 1.110.0rc2.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Wed, 26 Jun 2024 18:14:48 +0200
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.110.0~rc1) stable; urgency=medium
|
||||||
|
|
||||||
|
* `register_new_matrix_user` now supports a --password-file and a --exists-ok flag.
|
||||||
|
* New Synapse release 1.110.0rc1.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Wed, 26 Jun 2024 14:07:56 +0200
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.109.0) stable; urgency=medium
|
||||||
|
|
||||||
|
* New synapse release 1.109.0.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Tue, 18 Jun 2024 09:45:15 +0000
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.109.0~rc3) stable; urgency=medium
|
||||||
|
|
||||||
|
* New synapse release 1.109.0rc3.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Mon, 17 Jun 2024 12:05:24 +0000
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.109.0~rc2) stable; urgency=medium
|
||||||
|
|
||||||
|
* New synapse release 1.109.0rc2.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Tue, 11 Jun 2024 13:20:17 +0000
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.109.0~rc1) stable; urgency=medium
|
||||||
|
|
||||||
|
* New Synapse release 1.109.0rc1.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Tue, 04 Jun 2024 09:42:46 +0100
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.108.0) stable; urgency=medium
|
||||||
|
|
||||||
|
* New Synapse release 1.108.0.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Tue, 28 May 2024 11:54:22 +0100
|
||||||
|
|
||||||
matrix-synapse-py3 (1.108.0~rc1) stable; urgency=medium
|
matrix-synapse-py3 (1.108.0~rc1) stable; urgency=medium
|
||||||
|
|
||||||
* New Synapse release 1.108.0rc1.
|
* New Synapse release 1.108.0rc1.
|
||||||
|
|||||||
27
debian/hash_password.1
vendored
27
debian/hash_password.1
vendored
@@ -1,10 +1,13 @@
|
|||||||
.\" generated with Ronn-NG/v0.8.0
|
.\" generated with Ronn-NG/v0.10.1
|
||||||
.\" http://github.com/apjanke/ronn-ng/tree/0.8.0
|
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
||||||
.TH "HASH_PASSWORD" "1" "July 2021" "" ""
|
.TH "HASH_PASSWORD" "1" "August 2024" ""
|
||||||
.SH "NAME"
|
.SH "NAME"
|
||||||
\fBhash_password\fR \- Calculate the hash of a new password, so that passwords can be reset
|
\fBhash_password\fR \- Calculate the hash of a new password, so that passwords can be reset
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
\fBhash_password\fR [\fB\-p\fR|\fB\-\-password\fR [password]] [\fB\-c\fR|\fB\-\-config\fR \fIfile\fR]
|
.TS
|
||||||
|
allbox;
|
||||||
|
\fBhash_password\fR [\fB\-p\fR \fB\-\-password\fR [password]] [\fB\-c\fR \fB\-\-config\fR \fIfile\fR]
|
||||||
|
.TE
|
||||||
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
||||||
\fBhash_password\fR calculates the hash of a supplied password using bcrypt\.
|
\fBhash_password\fR calculates the hash of a supplied password using bcrypt\.
|
||||||
.P
|
.P
|
||||||
@@ -20,7 +23,7 @@ bcrypt_rounds: 17 password_config: pepper: "random hashing pepper"
|
|||||||
.SH "OPTIONS"
|
.SH "OPTIONS"
|
||||||
.TP
|
.TP
|
||||||
\fB\-p\fR, \fB\-\-password\fR
|
\fB\-p\fR, \fB\-\-password\fR
|
||||||
Read the password form the command line if [password] is supplied\. If not, prompt the user and read the password form the \fBSTDIN\fR\. It is not recommended to type the password on the command line directly\. Use the STDIN instead\.
|
Read the password form the command line if [password] is supplied, or from \fBSTDIN\fR\. If not, prompt the user and read the password from the tty prompt\. It is not recommended to type the password on the command line directly\. Use the STDIN instead\.
|
||||||
.TP
|
.TP
|
||||||
\fB\-c\fR, \fB\-\-config\fR
|
\fB\-c\fR, \fB\-\-config\fR
|
||||||
Read the supplied YAML \fIfile\fR containing the options \fBbcrypt_rounds\fR and the \fBpassword_config\fR section containing the \fBpepper\fR value\.
|
Read the supplied YAML \fIfile\fR containing the options \fBbcrypt_rounds\fR and the \fBpassword_config\fR section containing the \fBpepper\fR value\.
|
||||||
@@ -33,7 +36,17 @@ $2b$12$VJNqWQYfsWTEwcELfoSi4Oa8eA17movHqqi8\.X8fWFpum7SxZ9MFe
|
|||||||
.fi
|
.fi
|
||||||
.IP "" 0
|
.IP "" 0
|
||||||
.P
|
.P
|
||||||
Hash from the STDIN:
|
Hash from the stdin:
|
||||||
|
.IP "" 4
|
||||||
|
.nf
|
||||||
|
$ cat password_file | hash_password
|
||||||
|
Password:
|
||||||
|
Confirm password:
|
||||||
|
$2b$12$AszlvfmJl2esnyhmn8m/kuR2tdXgROWtWxnX\.rcuAbM8ErLoUhybG
|
||||||
|
.fi
|
||||||
|
.IP "" 0
|
||||||
|
.P
|
||||||
|
Hash from the prompt:
|
||||||
.IP "" 4
|
.IP "" 4
|
||||||
.nf
|
.nf
|
||||||
$ hash_password
|
$ hash_password
|
||||||
@@ -53,6 +66,6 @@ $2b$12$CwI\.wBNr\.w3kmiUlV3T5s\.GT2wH7uebDCovDrCOh18dFedlANK99O
|
|||||||
.fi
|
.fi
|
||||||
.IP "" 0
|
.IP "" 0
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
This man page was written by Rahul De <\fI\%mailto:rahulde@swecha\.net\fR> for Debian GNU/Linux distribution\.
|
This man page was written by Rahul De «rahulde@swecha\.net» for Debian GNU/Linux distribution\.
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
synctl(1), synapse_port_db(1), register_new_matrix_user(1), synapse_review_recent_signups(1)
|
synctl(1), synapse_port_db(1), register_new_matrix_user(1), synapse_review_recent_signups(1)
|
||||||
|
|||||||
182
debian/hash_password.1.html
vendored
Normal file
182
debian/hash_password.1.html
vendored
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv='content-type' content='text/html;charset=utf-8'>
|
||||||
|
<meta name='generator' content='Ronn-NG/v0.10.1 (http://github.com/apjanke/ronn-ng/tree/0.10.1)'>
|
||||||
|
<title>hash_password(1) - Calculate the hash of a new password, so that passwords can be reset</title>
|
||||||
|
<style type='text/css' media='all'>
|
||||||
|
/* style: man */
|
||||||
|
body#manpage {margin:0}
|
||||||
|
.mp {max-width:100ex;padding:0 9ex 1ex 4ex}
|
||||||
|
.mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
|
||||||
|
.mp h2 {margin:10px 0 0 0}
|
||||||
|
.mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
|
||||||
|
.mp h3 {margin:0 0 0 4ex}
|
||||||
|
.mp dt {margin:0;clear:left}
|
||||||
|
.mp dt.flush {float:left;width:8ex}
|
||||||
|
.mp dd {margin:0 0 0 9ex}
|
||||||
|
.mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
|
||||||
|
.mp pre {margin-bottom:20px}
|
||||||
|
.mp pre+h2,.mp pre+h3 {margin-top:22px}
|
||||||
|
.mp h2+pre,.mp h3+pre {margin-top:5px}
|
||||||
|
.mp img {display:block;margin:auto}
|
||||||
|
.mp h1.man-title {display:none}
|
||||||
|
.mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
|
||||||
|
.mp h2 {font-size:16px;line-height:1.25}
|
||||||
|
.mp h1 {font-size:20px;line-height:2}
|
||||||
|
.mp {text-align:justify;background:#fff}
|
||||||
|
.mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
|
||||||
|
.mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
|
||||||
|
.mp u {text-decoration:underline}
|
||||||
|
.mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
|
||||||
|
.mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
|
||||||
|
.mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
|
||||||
|
.mp b.man-ref {font-weight:normal;color:#434241}
|
||||||
|
.mp pre {padding:0 4ex}
|
||||||
|
.mp pre code {font-weight:normal;color:#434241}
|
||||||
|
.mp h2+pre,h3+pre {padding-left:0}
|
||||||
|
ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
|
||||||
|
ol.man-decor {width:100%}
|
||||||
|
ol.man-decor li.tl {text-align:left}
|
||||||
|
ol.man-decor li.tc {text-align:center;letter-spacing:4px}
|
||||||
|
ol.man-decor li.tr {text-align:right;float:right}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<!--
|
||||||
|
The following styles are deprecated and will be removed at some point:
|
||||||
|
div#man, div#man ol.man, div#man ol.head, div#man ol.man.
|
||||||
|
|
||||||
|
The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
|
||||||
|
.man-navigation should be used instead.
|
||||||
|
-->
|
||||||
|
<body id='manpage'>
|
||||||
|
<div class='mp' id='man'>
|
||||||
|
|
||||||
|
<div class='man-navigation' style='display:none'>
|
||||||
|
<a href="#NAME">NAME</a>
|
||||||
|
<a href="#SYNOPSIS">SYNOPSIS</a>
|
||||||
|
<a href="#DESCRIPTION">DESCRIPTION</a>
|
||||||
|
<a href="#FILES">FILES</a>
|
||||||
|
<a href="#OPTIONS">OPTIONS</a>
|
||||||
|
<a href="#EXAMPLES">EXAMPLES</a>
|
||||||
|
<a href="#COPYRIGHT">COPYRIGHT</a>
|
||||||
|
<a href="#SEE-ALSO">SEE ALSO</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ol class='man-decor man-head man head'>
|
||||||
|
<li class='tl'>hash_password(1)</li>
|
||||||
|
<li class='tc'></li>
|
||||||
|
<li class='tr'>hash_password(1)</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2 id="NAME">NAME</h2>
|
||||||
|
<p class="man-name">
|
||||||
|
<code>hash_password</code> - <span class="man-whatis">Calculate the hash of a new password, so that passwords can be reset</span>
|
||||||
|
</p>
|
||||||
|
<h2 id="SYNOPSIS">SYNOPSIS</h2>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>hash_password</code> [<code>-p</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<code>--password</code> [password]] [<code>-c</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<code>--config</code> <var>file</var>]</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
||||||
|
|
||||||
|
<p><strong>hash_password</strong> calculates the hash of a supplied password using bcrypt.</p>
|
||||||
|
|
||||||
|
<p><code>hash_password</code> takes a password as an parameter either on the command line
|
||||||
|
or the <code>STDIN</code> if not supplied.</p>
|
||||||
|
|
||||||
|
<p>It accepts an YAML file which can be used to specify parameters like the
|
||||||
|
number of rounds for bcrypt and password_config section having the pepper
|
||||||
|
value used for the hashing. By default <code>bcrypt_rounds</code> is set to <strong>12</strong>.</p>
|
||||||
|
|
||||||
|
<p>The hashed password is written on the <code>STDOUT</code>.</p>
|
||||||
|
|
||||||
|
<h2 id="FILES">FILES</h2>
|
||||||
|
|
||||||
|
<p>A sample YAML file accepted by <code>hash_password</code> is described below:</p>
|
||||||
|
|
||||||
|
<p>bcrypt_rounds: 17
|
||||||
|
password_config:
|
||||||
|
pepper: "random hashing pepper"</p>
|
||||||
|
|
||||||
|
<h2 id="OPTIONS">OPTIONS</h2>
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
<code>-p</code>, <code>--password</code>
|
||||||
|
</dt>
|
||||||
|
<dd>Read the password form the command line if [password] is supplied, or from <code>STDIN</code>.
|
||||||
|
If not, prompt the user and read the password from the tty prompt.
|
||||||
|
It is not recommended to type the password on the command line
|
||||||
|
directly. Use the STDIN instead.</dd>
|
||||||
|
<dt>
|
||||||
|
<code>-c</code>, <code>--config</code>
|
||||||
|
</dt>
|
||||||
|
<dd>Read the supplied YAML <var>file</var> containing the options <code>bcrypt_rounds</code>
|
||||||
|
and the <code>password_config</code> section containing the <code>pepper</code> value.</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<h2 id="EXAMPLES">EXAMPLES</h2>
|
||||||
|
|
||||||
|
<p>Hash from the command line:</p>
|
||||||
|
|
||||||
|
<pre><code>$ hash_password -p "p@ssw0rd"
|
||||||
|
$2b$12$VJNqWQYfsWTEwcELfoSi4Oa8eA17movHqqi8.X8fWFpum7SxZ9MFe
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Hash from the stdin:</p>
|
||||||
|
|
||||||
|
<pre><code>$ cat password_file | hash_password
|
||||||
|
Password:
|
||||||
|
Confirm password:
|
||||||
|
$2b$12$AszlvfmJl2esnyhmn8m/kuR2tdXgROWtWxnX.rcuAbM8ErLoUhybG
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Hash from the prompt:</p>
|
||||||
|
|
||||||
|
<pre><code>$ hash_password
|
||||||
|
Password:
|
||||||
|
Confirm password:
|
||||||
|
$2b$12$AszlvfmJl2esnyhmn8m/kuR2tdXgROWtWxnX.rcuAbM8ErLoUhybG
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Using a config file:</p>
|
||||||
|
|
||||||
|
<pre><code>$ hash_password -c config.yml
|
||||||
|
Password:
|
||||||
|
Confirm password:
|
||||||
|
$2b$12$CwI.wBNr.w3kmiUlV3T5s.GT2wH7uebDCovDrCOh18dFedlANK99O
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h2 id="COPYRIGHT">COPYRIGHT</h2>
|
||||||
|
|
||||||
|
<p>This man page was written by Rahul De «rahulde@swecha.net»
|
||||||
|
for Debian GNU/Linux distribution.</p>
|
||||||
|
|
||||||
|
<h2 id="SEE-ALSO">SEE ALSO</h2>
|
||||||
|
|
||||||
|
<p><span class="man-ref">synctl<span class="s">(1)</span></span>, <span class="man-ref">synapse_port_db<span class="s">(1)</span></span>, <span class="man-ref">register_new_matrix_user<span class="s">(1)</span></span>, <span class="man-ref">synapse_review_recent_signups<span class="s">(1)</span></span></p>
|
||||||
|
|
||||||
|
<ol class='man-decor man-foot man foot'>
|
||||||
|
<li class='tl'></li>
|
||||||
|
<li class='tc'>August 2024</li>
|
||||||
|
<li class='tr'>hash_password(1)</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
13
debian/hash_password.ronn
vendored
13
debian/hash_password.ronn
vendored
@@ -29,8 +29,8 @@ A sample YAML file accepted by `hash_password` is described below:
|
|||||||
## OPTIONS
|
## OPTIONS
|
||||||
|
|
||||||
* `-p`, `--password`:
|
* `-p`, `--password`:
|
||||||
Read the password form the command line if [password] is supplied.
|
Read the password form the command line if [password] is supplied, or from `STDIN`.
|
||||||
If not, prompt the user and read the password form the `STDIN`.
|
If not, prompt the user and read the password from the tty prompt.
|
||||||
It is not recommended to type the password on the command line
|
It is not recommended to type the password on the command line
|
||||||
directly. Use the STDIN instead.
|
directly. Use the STDIN instead.
|
||||||
|
|
||||||
@@ -45,7 +45,14 @@ Hash from the command line:
|
|||||||
$ hash_password -p "p@ssw0rd"
|
$ hash_password -p "p@ssw0rd"
|
||||||
$2b$12$VJNqWQYfsWTEwcELfoSi4Oa8eA17movHqqi8.X8fWFpum7SxZ9MFe
|
$2b$12$VJNqWQYfsWTEwcELfoSi4Oa8eA17movHqqi8.X8fWFpum7SxZ9MFe
|
||||||
|
|
||||||
Hash from the STDIN:
|
Hash from the stdin:
|
||||||
|
|
||||||
|
$ cat password_file | hash_password
|
||||||
|
Password:
|
||||||
|
Confirm password:
|
||||||
|
$2b$12$AszlvfmJl2esnyhmn8m/kuR2tdXgROWtWxnX.rcuAbM8ErLoUhybG
|
||||||
|
|
||||||
|
Hash from the prompt:
|
||||||
|
|
||||||
$ hash_password
|
$ hash_password
|
||||||
Password:
|
Password:
|
||||||
|
|||||||
11
debian/register_new_matrix_user.ronn
vendored
11
debian/register_new_matrix_user.ronn
vendored
@@ -31,8 +31,12 @@ A sample YAML file accepted by `register_new_matrix_user` is described below:
|
|||||||
Local part of the new user. Will prompt if omitted.
|
Local part of the new user. Will prompt if omitted.
|
||||||
|
|
||||||
* `-p`, `--password`:
|
* `-p`, `--password`:
|
||||||
New password for user. Will prompt if omitted. Supplying the password
|
New password for user. Will prompt if this option and `--password-file` are omitted.
|
||||||
on the command line is not recommended. Use the STDIN instead.
|
Supplying the password on the command line is not recommended.
|
||||||
|
|
||||||
|
* `--password-file`:
|
||||||
|
File containing the new password for user. If set, overrides `--password`.
|
||||||
|
This is a more secure alternative to specifying the password on the command line.
|
||||||
|
|
||||||
* `-a`, `--admin`:
|
* `-a`, `--admin`:
|
||||||
Register new user as an admin. Will prompt if omitted.
|
Register new user as an admin. Will prompt if omitted.
|
||||||
@@ -44,6 +48,9 @@ A sample YAML file accepted by `register_new_matrix_user` is described below:
|
|||||||
Shared secret as defined in server config file. This is an optional
|
Shared secret as defined in server config file. This is an optional
|
||||||
parameter as it can be also supplied via the YAML file.
|
parameter as it can be also supplied via the YAML file.
|
||||||
|
|
||||||
|
* `--exists-ok`:
|
||||||
|
Do not fail if the user already exists. The user account will be not updated in this case.
|
||||||
|
|
||||||
* `server_url`:
|
* `server_url`:
|
||||||
URL of the home server. Defaults to 'https://localhost:8448'.
|
URL of the home server. Defaults to 'https://localhost:8448'.
|
||||||
|
|
||||||
|
|||||||
2
debian/templates
vendored
2
debian/templates
vendored
@@ -5,7 +5,7 @@ _Description: Name of the server:
|
|||||||
servers via federation. This is normally the public hostname of the
|
servers via federation. This is normally the public hostname of the
|
||||||
server running synapse, but can be different if you set up delegation.
|
server running synapse, but can be different if you set up delegation.
|
||||||
Please refer to the delegation documentation in this case:
|
Please refer to the delegation documentation in this case:
|
||||||
https://github.com/element-hq/synapse/blob/master/docs/delegate.md.
|
https://element-hq.github.io/synapse/latest/delegate.html.
|
||||||
|
|
||||||
Template: matrix-synapse/report-stats
|
Template: matrix-synapse/report-stats
|
||||||
Type: boolean
|
Type: boolean
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ ARG PYTHON_VERSION=3.11
|
|||||||
###
|
###
|
||||||
# We hardcode the use of Debian bookworm here because this could change upstream
|
# We hardcode the use of Debian bookworm here because this could change upstream
|
||||||
# and other Dockerfiles used for testing are expecting bookworm.
|
# and other Dockerfiles used for testing are expecting bookworm.
|
||||||
FROM docker.io/library/python:${PYTHON_VERSION}-slim-bookworm as requirements
|
FROM docker.io/library/python:${PYTHON_VERSION}-slim-bookworm AS requirements
|
||||||
|
|
||||||
# RUN --mount is specific to buildkit and is documented at
|
# RUN --mount is specific to buildkit and is documented at
|
||||||
# https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/syntax.md#build-mounts-run---mount.
|
# https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/syntax.md#build-mounts-run---mount.
|
||||||
@@ -87,7 +87,7 @@ RUN if [ -z "$TEST_ONLY_IGNORE_POETRY_LOCKFILE" ]; then \
|
|||||||
###
|
###
|
||||||
### Stage 1: builder
|
### Stage 1: builder
|
||||||
###
|
###
|
||||||
FROM docker.io/library/python:${PYTHON_VERSION}-slim-bookworm as builder
|
FROM docker.io/library/python:${PYTHON_VERSION}-slim-bookworm AS builder
|
||||||
|
|
||||||
# install the OS build deps
|
# install the OS build deps
|
||||||
RUN \
|
RUN \
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ ARG distro=""
|
|||||||
# https://launchpad.net/~jyrki-pulliainen/+archive/ubuntu/dh-virtualenv, but
|
# https://launchpad.net/~jyrki-pulliainen/+archive/ubuntu/dh-virtualenv, but
|
||||||
# it's not obviously easier to use that than to build our own.)
|
# it's not obviously easier to use that than to build our own.)
|
||||||
|
|
||||||
FROM docker.io/library/${distro} as builder
|
FROM docker.io/library/${distro} AS builder
|
||||||
|
|
||||||
RUN apt-get update -qq -o Acquire::Languages=none
|
RUN apt-get update -qq -o Acquire::Languages=none
|
||||||
RUN env DEBIAN_FRONTEND=noninteractive apt-get install \
|
RUN env DEBIAN_FRONTEND=noninteractive apt-get install \
|
||||||
@@ -73,6 +73,8 @@ RUN apt-get update -qq -o Acquire::Languages=none \
|
|||||||
curl \
|
curl \
|
||||||
debhelper \
|
debhelper \
|
||||||
devscripts \
|
devscripts \
|
||||||
|
# Required for building cffi from source.
|
||||||
|
libffi-dev \
|
||||||
libsystemd-dev \
|
libsystemd-dev \
|
||||||
lsb-release \
|
lsb-release \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ DIST=$(cut -d ':' -f2 <<< "${distro:?}")
|
|||||||
cp -aT /synapse/source /synapse/build
|
cp -aT /synapse/source /synapse/build
|
||||||
cd /synapse/build
|
cd /synapse/build
|
||||||
|
|
||||||
|
# Delete any existing `.so` files to ensure a clean build.
|
||||||
|
rm -f /synapse/build/synapse/*.so
|
||||||
|
|
||||||
# if this is a prerelease, set the Section accordingly.
|
# if this is a prerelease, set the Section accordingly.
|
||||||
#
|
#
|
||||||
# When the package is later added to the package repo, reprepro will use the
|
# When the package is later added to the package repo, reprepro will use the
|
||||||
|
|||||||
@@ -105,8 +105,6 @@ experimental_features:
|
|||||||
# Expose a room summary for public rooms
|
# Expose a room summary for public rooms
|
||||||
msc3266_enabled: true
|
msc3266_enabled: true
|
||||||
|
|
||||||
msc4115_membership_on_events: true
|
|
||||||
|
|
||||||
server_notices:
|
server_notices:
|
||||||
system_mxid_localpart: _server
|
system_mxid_localpart: _server
|
||||||
system_mxid_display_name: "Server Alert"
|
system_mxid_display_name: "Server Alert"
|
||||||
|
|||||||
@@ -176,7 +176,6 @@ app_service_config_files:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
macaroon_secret_key: "{{ SYNAPSE_MACAROON_SECRET_KEY }}"
|
macaroon_secret_key: "{{ SYNAPSE_MACAROON_SECRET_KEY }}"
|
||||||
expire_access_token: False
|
|
||||||
|
|
||||||
## Signing Keys ##
|
## Signing Keys ##
|
||||||
|
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ WORKERS_CONFIG: Dict[str, Dict[str, Any]] = {
|
|||||||
},
|
},
|
||||||
"media_repository": {
|
"media_repository": {
|
||||||
"app": "synapse.app.generic_worker",
|
"app": "synapse.app.generic_worker",
|
||||||
"listener_resources": ["media"],
|
"listener_resources": ["media", "client"],
|
||||||
"endpoint_patterns": [
|
"endpoint_patterns": [
|
||||||
"^/_matrix/media/",
|
"^/_matrix/media/",
|
||||||
"^/_synapse/admin/v1/purge_media_cache$",
|
"^/_synapse/admin/v1/purge_media_cache$",
|
||||||
@@ -125,6 +125,8 @@ WORKERS_CONFIG: Dict[str, Dict[str, Any]] = {
|
|||||||
"^/_synapse/admin/v1/user/.*/media.*$",
|
"^/_synapse/admin/v1/user/.*/media.*$",
|
||||||
"^/_synapse/admin/v1/media/.*$",
|
"^/_synapse/admin/v1/media/.*$",
|
||||||
"^/_synapse/admin/v1/quarantine_media/.*$",
|
"^/_synapse/admin/v1/quarantine_media/.*$",
|
||||||
|
"^/_matrix/client/v1/media/.*$",
|
||||||
|
"^/_matrix/federation/v1/media/.*$",
|
||||||
],
|
],
|
||||||
# The first configured media worker will run the media background jobs
|
# The first configured media worker will run the media background jobs
|
||||||
"shared_extra_conf": {
|
"shared_extra_conf": {
|
||||||
|
|||||||
@@ -1,21 +1,17 @@
|
|||||||
# Experimental Features API
|
# Experimental Features API
|
||||||
|
|
||||||
This API allows a server administrator to enable or disable some experimental features on a per-user
|
This API allows a server administrator to enable or disable some experimental features on a per-user
|
||||||
basis. The currently supported features are:
|
basis. The currently supported features are:
|
||||||
- [MSC3026](https://github.com/matrix-org/matrix-spec-proposals/pull/3026): busy
|
- [MSC3881](https://github.com/matrix-org/matrix-spec-proposals/pull/3881): enable remotely toggling push notifications
|
||||||
presence state enabled
|
for another client
|
||||||
- [MSC3881](https://github.com/matrix-org/matrix-spec-proposals/pull/3881): enable remotely toggling push notifications
|
- [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575): enable experimental sliding sync support
|
||||||
for another client
|
|
||||||
- [MSC3967](https://github.com/matrix-org/matrix-spec-proposals/pull/3967): do not require
|
|
||||||
UIA when first uploading cross-signing keys.
|
|
||||||
|
|
||||||
|
|
||||||
To use it, you will need to authenticate by providing an `access_token`
|
To use it, you will need to authenticate by providing an `access_token`
|
||||||
for a server admin: see [Admin API](../usage/administration/admin_api/).
|
for a server admin: see [Admin API](../usage/administration/admin_api/).
|
||||||
|
|
||||||
## Enabling/Disabling Features
|
## Enabling/Disabling Features
|
||||||
|
|
||||||
This API allows a server administrator to enable experimental features for a given user. The request must
|
This API allows a server administrator to enable experimental features for a given user. The request must
|
||||||
provide a body containing the user id and listing the features to enable/disable in the following format:
|
provide a body containing the user id and listing the features to enable/disable in the following format:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -35,7 +31,7 @@ PUT /_synapse/admin/v1/experimental_features/<user_id>
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Listing Enabled Features
|
## Listing Enabled Features
|
||||||
|
|
||||||
To list which features are enabled/disabled for a given user send a request to the following API:
|
To list which features are enabled/disabled for a given user send a request to the following API:
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -52,4 +48,4 @@ user like so:
|
|||||||
"msc3967": false
|
"msc3967": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ The following query parameters are available:
|
|||||||
- the room's name,
|
- the room's name,
|
||||||
- the local part of the room's canonical alias, or
|
- the local part of the room's canonical alias, or
|
||||||
- the complete (local and server part) room's id (case sensitive).
|
- the complete (local and server part) room's id (case sensitive).
|
||||||
|
* `public_rooms` - Optional flag to filter public rooms. If `true`, only public rooms are queried. If `false`, public rooms are excluded from
|
||||||
|
the query. When the flag is absent (the default), **both** public and non-public rooms are included in the search results.
|
||||||
|
* `empty_rooms` - Optional flag to filter empty rooms. A room is empty if joined_members is zero. If `true`, only empty rooms are queried. If `false`, empty rooms are excluded from
|
||||||
|
the query. When the flag is absent (the default), **both** empty and non-empty rooms are included in the search results.
|
||||||
|
|
||||||
Defaults to no filtering.
|
Defaults to no filtering.
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,7 @@ errors in code.
|
|||||||
|
|
||||||
The necessary tools are:
|
The necessary tools are:
|
||||||
|
|
||||||
- [black](https://black.readthedocs.io/en/stable/), a source code formatter;
|
- [ruff](https://github.com/charliermarsh/ruff), which can spot common errors and enforce a consistent style; and
|
||||||
- [isort](https://pycqa.github.io/isort/), which organises each file's imports;
|
|
||||||
- [ruff](https://github.com/charliermarsh/ruff), which can spot common errors; and
|
|
||||||
- [mypy](https://mypy.readthedocs.io/en/stable/), a type checker.
|
- [mypy](https://mypy.readthedocs.io/en/stable/), a type checker.
|
||||||
|
|
||||||
See [the contributing guide](development/contributing_guide.md#run-the-linters) for instructions
|
See [the contributing guide](development/contributing_guide.md#run-the-linters) for instructions
|
||||||
|
|||||||
@@ -449,9 +449,9 @@ For example, a fix in PR #1234 would have its changelog entry in
|
|||||||
> The security levels of Florbs are now validated when received
|
> The security levels of Florbs are now validated when received
|
||||||
> via the `/federation/florb` endpoint. Contributed by Jane Matrix.
|
> via the `/federation/florb` endpoint. Contributed by Jane Matrix.
|
||||||
|
|
||||||
If there are multiple pull requests involved in a single bugfix/feature/etc,
|
If there are multiple pull requests involved in a single bugfix/feature/etc, then the
|
||||||
then the content for each `changelog.d` file should be the same. Towncrier will
|
content for each `changelog.d` file and file extension should be the same. Towncrier
|
||||||
merge the matching files together into a single changelog entry when we come to
|
will merge the matching files together into a single changelog entry when we come to
|
||||||
release.
|
release.
|
||||||
|
|
||||||
### How do I know what to call the changelog file before I create the PR?
|
### How do I know what to call the changelog file before I create the PR?
|
||||||
|
|||||||
@@ -21,8 +21,10 @@ incrementing integer, but backfilled events start with `stream_ordering=-1` and
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- `/sync` returns things in the order they arrive at the server (`stream_ordering`).
|
- Incremental `/sync?since=xxx` returns things in the order they arrive at the server
|
||||||
- `/messages` (and `/backfill` in the federation API) return them in the order determined by the event graph `(topological_ordering, stream_ordering)`.
|
(`stream_ordering`).
|
||||||
|
- Initial `/sync`, `/messages` (and `/backfill` in the federation API) return them in
|
||||||
|
the order determined by the event graph `(topological_ordering, stream_ordering)`.
|
||||||
|
|
||||||
The general idea is that, if you're following a room in real-time (i.e.
|
The general idea is that, if you're following a room in real-time (i.e.
|
||||||
`/sync`), you probably want to see the messages as they arrive at your server,
|
`/sync`), you probably want to see the messages as they arrive at your server,
|
||||||
|
|||||||
94
docs/element_logo_white_bg.svg
Normal file
94
docs/element_logo_white_bg.svg
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="41.440346mm"
|
||||||
|
height="10.383124mm"
|
||||||
|
viewBox="0 0 41.440346 10.383125"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
xml:space="preserve"
|
||||||
|
sodipodi:docname="element_logo_white_bg.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:export-bgcolor="#ffffffff" /><defs
|
||||||
|
id="defs1" /><g
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-84.803844,-143.2075)"
|
||||||
|
inkscape:export-filename="element_logo_white_bg.svg"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96"><g
|
||||||
|
style="fill:none"
|
||||||
|
id="g1"
|
||||||
|
transform="matrix(0.26458333,0,0,0.26458333,85.841658,144.26667)"><rect
|
||||||
|
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.31041;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect20"
|
||||||
|
width="155.31451"
|
||||||
|
height="37.932892"
|
||||||
|
x="-3.2672384"
|
||||||
|
y="-3.3479743"
|
||||||
|
rx="3.3718522"
|
||||||
|
ry="3.7915266"
|
||||||
|
transform="translate(-2.1259843e-6)"
|
||||||
|
inkscape:label="rect20"
|
||||||
|
inkscape:export-filename="rect20.svg"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96" /><path
|
||||||
|
fill-rule="evenodd"
|
||||||
|
clip-rule="evenodd"
|
||||||
|
d="M 16,32 C 24.8366,32 32,24.8366 32,16 32,7.16344 24.8366,0 16,0 7.16344,0 0,7.16344 0,16 0,24.8366 7.16344,32 16,32 Z"
|
||||||
|
fill="#0dbd8b"
|
||||||
|
id="path1" /><path
|
||||||
|
fill-rule="evenodd"
|
||||||
|
clip-rule="evenodd"
|
||||||
|
d="m 13.0756,7.455 c 0,-0.64584 0.5247,-1.1694 1.1719,-1.1694 4.3864,0 7.9423,3.54853 7.9423,7.9259 0,0.6458 -0.5246,1.1694 -1.1718,1.1694 -0.6472,0 -1.1719,-0.5236 -1.1719,-1.1694 0,-3.0857 -2.5066,-5.58711 -5.5986,-5.58711 -0.6472,0 -1.1719,-0.52355 -1.1719,-1.16939 z"
|
||||||
|
fill="#ffffff"
|
||||||
|
id="path2" /><path
|
||||||
|
fill-rule="evenodd"
|
||||||
|
clip-rule="evenodd"
|
||||||
|
d="m 24.5424,13.042 c 0.6472,0 1.1719,0.5235 1.1719,1.1694 0,4.3773 -3.5559,7.9258 -7.9424,7.9258 -0.6472,0 -1.1718,-0.5235 -1.1718,-1.1693 0,-0.6459 0.5246,-1.1694 1.1718,-1.1694 3.0921,0 5.5987,-2.5015 5.5987,-5.5871 0,-0.6459 0.5247,-1.1694 1.1718,-1.1694 z"
|
||||||
|
fill="#ffffff"
|
||||||
|
id="path3" /><path
|
||||||
|
fill-rule="evenodd"
|
||||||
|
clip-rule="evenodd"
|
||||||
|
d="m 18.9446,24.5446 c 0,0.6459 -0.5247,1.1694 -1.1718,1.1694 -4.3865,0 -7.94239,-3.5485 -7.94239,-7.9258 0,-0.6459 0.52469,-1.1694 1.17179,-1.1694 0.6472,0 1.1719,0.5235 1.1719,1.1694 0,3.0856 2.5066,5.587 5.5987,5.587 0.6471,0 1.1718,0.5236 1.1718,1.1694 z"
|
||||||
|
fill="#ffffff"
|
||||||
|
id="path4" /><path
|
||||||
|
fill-rule="evenodd"
|
||||||
|
clip-rule="evenodd"
|
||||||
|
d="m 7.45823,18.9576 c -0.64718,0 -1.17183,-0.5235 -1.17183,-1.1694 0,-4.3773 3.55591,-7.92581 7.9423,-7.92581 0.6472,0 1.1719,0.52351 1.1719,1.16941 0,0.6458 -0.5247,1.1694 -1.1719,1.1694 -3.092,0 -5.59864,2.5014 -5.59864,5.587 0,0.6459 -0.52465,1.1694 -1.17183,1.1694 z"
|
||||||
|
fill="#ffffff"
|
||||||
|
id="path5" /><path
|
||||||
|
d="M 56.2856,18.1428 H 44.9998 c 0.1334,1.181 0.5619,2.1238 1.2858,2.8286 0.7238,0.6857 1.6761,1.0286 2.8571,1.0286 0.7809,0 1.4857,-0.1905 2.1143,-0.5715 0.6286,-0.3809 1.0762,-0.8952 1.3428,-1.5428 h 3.4286 c -0.4571,1.5047 -1.3143,2.7238 -2.5714,3.6571 -1.2381,0.9143 -2.7048,1.3715 -4.4,1.3715 -2.2095,0 -4,-0.7334 -5.3714,-2.2 -1.3524,-1.4667 -2.0286,-3.3239 -2.0286,-5.5715 0,-2.1905 0.6857,-4.0285 2.0571,-5.5143 1.3715,-1.4857 3.1429,-2.22853 5.3143,-2.22853 2.1714,0 3.9238,0.73333 5.2572,2.20003 1.3523,1.4476 2.0285,3.2762 2.0285,5.4857 z m -7.2572,-5.9714 c -1.0667,0 -1.9524,0.3143 -2.6571,0.9429 -0.7048,0.6285 -1.1429,1.4666 -1.3143,2.5142 h 7.8857 c -0.1524,-1.0476 -0.5714,-1.8857 -1.2571,-2.5142 -0.6858,-0.6286 -1.5715,-0.9429 -2.6572,-0.9429 z"
|
||||||
|
fill="#000000"
|
||||||
|
id="path6" /><path
|
||||||
|
d="M 58.6539,20.1428 V 3.14282 h 3.4 V 20.2 c 0,0.7619 0.419,1.1428 1.2571,1.1428 l 0.6,-0.0285 v 3.2285 c -0.3238,0.0572 -0.6667,0.0857 -1.0286,0.0857 -1.4666,0 -2.5428,-0.3714 -3.2285,-1.1142 -0.6667,-0.7429 -1,-1.8667 -1,-3.3715 z"
|
||||||
|
fill="#000000"
|
||||||
|
id="path7" /><path
|
||||||
|
d="M 79.7454,18.1428 H 68.4597 c 0.1333,1.181 0.5619,2.1238 1.2857,2.8286 0.7238,0.6857 1.6762,1.0286 2.8571,1.0286 0.781,0 1.4857,-0.1905 2.1143,-0.5715 0.6286,-0.3809 1.0762,-0.8952 1.3429,-1.5428 h 3.4285 c -0.4571,1.5047 -1.3143,2.7238 -2.5714,3.6571 -1.2381,0.9143 -2.7048,1.3715 -4.4,1.3715 -2.2095,0 -4,-0.7334 -5.3714,-2.2 -1.3524,-1.4667 -2.0286,-3.3239 -2.0286,-5.5715 0,-2.1905 0.6857,-4.0285 2.0571,-5.5143 1.3715,-1.4857 3.1429,-2.22853 5.3143,-2.22853 2.1715,0 3.9238,0.73333 5.2572,2.20003 1.3524,1.4476 2.0285,3.2762 2.0285,5.4857 z m -7.2572,-5.9714 c -1.0666,0 -1.9524,0.3143 -2.6571,0.9429 -0.7048,0.6285 -1.1429,1.4666 -1.3143,2.5142 h 7.8857 c -0.1524,-1.0476 -0.5714,-1.8857 -1.2571,-2.5142 -0.6857,-0.6286 -1.5715,-0.9429 -2.6572,-0.9429 z"
|
||||||
|
fill="#000000"
|
||||||
|
id="path8" /><path
|
||||||
|
d="m 95.0851,16.0571 v 8.5143 h -3.4 v -8.8857 c 0,-2.2476 -0.9333,-3.3714 -2.8,-3.3714 -1.0095,0 -1.819,0.3238 -2.4286,0.9714 -0.5904,0.6476 -0.8857,1.5333 -0.8857,2.6571 v 8.6286 h -3.4 V 9.74282 h 3.1429 v 1.97148 c 0.3619,-0.6667 0.9143,-1.2191 1.6571,-1.6572 0.7429,-0.43809 1.6667,-0.65713 2.7714,-0.65713 2.0572,0 3.5429,0.78093 4.4572,2.34283 1.2571,-1.5619 2.9333,-2.34283 5.0286,-2.34283 1.733,0 3.067,0.54285 4,1.62853 0.933,1.0667 1.4,2.4762 1.4,4.2286 v 9.3143 h -3.4 v -8.8857 c 0,-2.2476 -0.933,-3.3714 -2.8,-3.3714 -1.0286,0 -1.8477,0.3333 -2.4572,1 -0.5905,0.6476 -0.8857,1.5619 -0.8857,2.7428 z"
|
||||||
|
fill="#000000"
|
||||||
|
id="path9" /><path
|
||||||
|
d="m 121.537,18.1428 h -11.286 c 0.133,1.181 0.562,2.1238 1.286,2.8286 0.723,0.6857 1.676,1.0286 2.857,1.0286 0.781,0 1.486,-0.1905 2.114,-0.5715 0.629,-0.3809 1.076,-0.8952 1.343,-1.5428 h 3.429 c -0.458,1.5047 -1.315,2.7238 -2.572,3.6571 -1.238,0.9143 -2.705,1.3715 -4.4,1.3715 -2.209,0 -4,-0.7334 -5.371,-2.2 -1.353,-1.4667 -2.029,-3.3239 -2.029,-5.5715 0,-2.1905 0.686,-4.0285 2.057,-5.5143 1.372,-1.4857 3.143,-2.22853 5.315,-2.22853 2.171,0 3.923,0.73333 5.257,2.20003 1.352,1.4476 2.028,3.2762 2.028,5.4857 z m -7.257,-5.9714 c -1.067,0 -1.953,0.3143 -2.658,0.9429 -0.704,0.6285 -1.142,1.4666 -1.314,2.5142 h 7.886 c -0.153,-1.0476 -0.572,-1.8857 -1.257,-2.5142 -0.686,-0.6286 -1.572,-0.9429 -2.657,-0.9429 z"
|
||||||
|
fill="#000000"
|
||||||
|
id="path10" /><path
|
||||||
|
d="m 127.105,9.74282 v 1.97148 c 0.343,-0.6477 0.905,-1.1905 1.686,-1.6286 0.8,-0.45716 1.762,-0.68573 2.885,-0.68573 1.753,0 3.105,0.53333 4.058,1.60003 0.971,1.0666 1.457,2.4857 1.457,4.2571 v 9.3143 h -3.4 v -8.8857 c 0,-1.0476 -0.248,-1.8667 -0.743,-2.4572 -0.476,-0.6095 -1.21,-0.9142 -2.2,-0.9142 -1.086,0 -1.943,0.3238 -2.572,0.9714 -0.609,0.6476 -0.914,1.5428 -0.914,2.6857 v 8.6 h -3.4 V 9.74282 Z"
|
||||||
|
fill="#000000"
|
||||||
|
id="path11" /><path
|
||||||
|
d="m 147.12,21.5428 v 2.9429 c -0.419,0.1143 -1.009,0.1714 -1.771,0.1714 -2.895,0 -4.343,-1.4571 -4.343,-4.3714 v -7.8286 h -2.257 V 9.74282 h 2.257 V 5.88568 h 3.4 v 3.85714 h 2.772 v 2.71428 h -2.772 v 7.4857 c 0,1.1619 0.552,1.7429 1.657,1.7429 z"
|
||||||
|
fill="#000000"
|
||||||
|
id="path12" /></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 7.5 KiB |
@@ -242,12 +242,11 @@ host all all ::1/128 ident
|
|||||||
|
|
||||||
### Fixing incorrect `COLLATE` or `CTYPE`
|
### Fixing incorrect `COLLATE` or `CTYPE`
|
||||||
|
|
||||||
Synapse will refuse to set up a new database if it has the wrong values of
|
Synapse will refuse to start when using a database with incorrect values of
|
||||||
`COLLATE` and `CTYPE` set. Synapse will also refuse to start an existing database with incorrect values
|
`COLLATE` and `CTYPE` unless the config flag `allow_unsafe_locale`, found in the
|
||||||
of `COLLATE` and `CTYPE` unless the config flag `allow_unsafe_locale`, found in the
|
`database` section of the config, is set to true. Using different locales can
|
||||||
`database` section of the config, is set to true. Using different locales can cause issues if the locale library is updated from
|
cause issues if the locale library is updated from underneath the database, or
|
||||||
underneath the database, or if a different version of the locale is used on any
|
if a different version of the locale is used on any replicas.
|
||||||
replicas.
|
|
||||||
|
|
||||||
If you have a database with an unsafe locale, the safest way to fix the issue is to dump the database and recreate it with
|
If you have a database with an unsafe locale, the safest way to fix the issue is to dump the database and recreate it with
|
||||||
the correct locale parameter (as shown above). It is also possible to change the
|
the correct locale parameter (as shown above). It is also possible to change the
|
||||||
@@ -256,13 +255,3 @@ however extreme care must be taken to avoid database corruption.
|
|||||||
|
|
||||||
Note that the above may fail with an error about duplicate rows if corruption
|
Note that the above may fail with an error about duplicate rows if corruption
|
||||||
has already occurred, and such duplicate rows will need to be manually removed.
|
has already occurred, and such duplicate rows will need to be manually removed.
|
||||||
|
|
||||||
### Fixing inconsistent sequences error
|
|
||||||
|
|
||||||
Synapse uses Postgres sequences to generate IDs for various tables. A sequence
|
|
||||||
and associated table can get out of sync if, for example, Synapse has been
|
|
||||||
downgraded and then upgraded again.
|
|
||||||
|
|
||||||
To fix the issue shut down Synapse (including any and all workers) and run the
|
|
||||||
SQL command included in the error message. Once done Synapse should start
|
|
||||||
successfully.
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ in Synapse can be deactivated.
|
|||||||
**NOTE**: This has an impact on security and is for testing purposes only!
|
**NOTE**: This has an impact on security and is for testing purposes only!
|
||||||
|
|
||||||
To deactivate the certificate validation, the following setting must be added to
|
To deactivate the certificate validation, the following setting must be added to
|
||||||
your [homserver.yaml](../usage/configuration/homeserver_sample_config.md).
|
your [homeserver.yaml](../usage/configuration/homeserver_sample_config.md).
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
use_insecure_ssl_client_just_for_testing_do_not_use: true
|
use_insecure_ssl_client_just_for_testing_do_not_use: true
|
||||||
|
|||||||
@@ -309,7 +309,62 @@ sudo dnf install libtiff-devel libjpeg-devel libzip-devel freetype-devel \
|
|||||||
libwebp-devel libxml2-devel libxslt-devel libpq-devel \
|
libwebp-devel libxml2-devel libxslt-devel libpq-devel \
|
||||||
python3-virtualenv libffi-devel openssl-devel python3-devel \
|
python3-virtualenv libffi-devel openssl-devel python3-devel \
|
||||||
libicu-devel
|
libicu-devel
|
||||||
sudo dnf groupinstall "Development Tools"
|
sudo dnf group install "Development Tools"
|
||||||
|
```
|
||||||
|
|
||||||
|
##### Red Hat Enterprise Linux / Rocky Linux
|
||||||
|
|
||||||
|
*Note: The term "RHEL" below refers to both Red Hat Enterprise Linux and Rocky Linux. The distributions are 1:1 binary compatible.*
|
||||||
|
|
||||||
|
It's recommended to use the latest Python versions.
|
||||||
|
|
||||||
|
RHEL 8 in particular ships with Python 3.6 by default which is EOL and therefore no longer supported by Synapse. RHEL 9 ship with Python 3.9 which is still supported by the Python core team as of this writing. However, newer Python versions provide significant performance improvements and they're available in official distributions' repositories. Therefore it's recommended to use them.
|
||||||
|
|
||||||
|
Python 3.11 and 3.12 are available for both RHEL 8 and 9.
|
||||||
|
|
||||||
|
These commands should be run as root user.
|
||||||
|
|
||||||
|
RHEL 8
|
||||||
|
```bash
|
||||||
|
# Enable PowerTools repository
|
||||||
|
dnf config-manager --set-enabled powertools
|
||||||
|
```
|
||||||
|
RHEL 9
|
||||||
|
```bash
|
||||||
|
# Enable CodeReady Linux Builder repository
|
||||||
|
crb enable
|
||||||
|
```
|
||||||
|
|
||||||
|
Install new version of Python. You only need one of these:
|
||||||
|
```bash
|
||||||
|
# Python 3.11
|
||||||
|
dnf install python3.11 python3.11-devel
|
||||||
|
```
|
||||||
|
```bash
|
||||||
|
# Python 3.12
|
||||||
|
dnf install python3.12 python3.12-devel
|
||||||
|
```
|
||||||
|
Finally, install common prerequisites
|
||||||
|
```bash
|
||||||
|
dnf install libicu libicu-devel libpq5 libpq5-devel lz4 pkgconf
|
||||||
|
dnf group install "Development Tools"
|
||||||
|
```
|
||||||
|
###### Using venv module instead of virtualenv command
|
||||||
|
|
||||||
|
It's recommended to use Python venv module directly rather than the virtualenv command.
|
||||||
|
* On RHEL 9, virtualenv is only available on [EPEL](https://docs.fedoraproject.org/en-US/epel/).
|
||||||
|
* On RHEL 8, virtualenv is based on Python 3.6. It does not support creating 3.11/3.12 virtual environments.
|
||||||
|
|
||||||
|
Here's an example of creating Python 3.12 virtual environment and installing Synapse from PyPI.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p ~/synapse
|
||||||
|
# To use Python 3.11, simply use the command "python3.11" instead.
|
||||||
|
python3.12 -m venv ~/synapse/env
|
||||||
|
source ~/synapse/env/bin/activate
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install --upgrade setuptools
|
||||||
|
pip install matrix-synapse
|
||||||
```
|
```
|
||||||
|
|
||||||
##### macOS
|
##### macOS
|
||||||
|
|||||||
@@ -117,6 +117,20 @@ each upgrade are complete before moving on to the next upgrade, to avoid
|
|||||||
stacking them up. You can monitor the currently running background updates with
|
stacking them up. You can monitor the currently running background updates with
|
||||||
[the Admin API](usage/administration/admin_api/background_updates.html#status).
|
[the Admin API](usage/administration/admin_api/background_updates.html#status).
|
||||||
|
|
||||||
|
# Upgrading to v1.111.0
|
||||||
|
|
||||||
|
## New worker endpoints for authenticated client and federation media
|
||||||
|
|
||||||
|
[Media repository workers](./workers.md#synapseappmedia_repository) handling
|
||||||
|
Media APIs can now handle the following endpoint patterns:
|
||||||
|
|
||||||
|
```
|
||||||
|
^/_matrix/client/v1/media/.*$
|
||||||
|
^/_matrix/federation/v1/media/.*$
|
||||||
|
```
|
||||||
|
|
||||||
|
Please update your reverse proxy configuration.
|
||||||
|
|
||||||
# Upgrading to v1.106.0
|
# Upgrading to v1.106.0
|
||||||
|
|
||||||
## Minimum supported Rust version
|
## Minimum supported Rust version
|
||||||
|
|||||||
@@ -246,6 +246,7 @@ Example configuration:
|
|||||||
```yaml
|
```yaml
|
||||||
presence:
|
presence:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
include_offline_users_on_sync: false
|
||||||
```
|
```
|
||||||
|
|
||||||
`enabled` can also be set to a special value of "untracked" which ignores updates
|
`enabled` can also be set to a special value of "untracked" which ignores updates
|
||||||
@@ -254,6 +255,10 @@ received via clients and federation, while still accepting updates from the
|
|||||||
|
|
||||||
*The "untracked" option was added in Synapse 1.96.0.*
|
*The "untracked" option was added in Synapse 1.96.0.*
|
||||||
|
|
||||||
|
When clients perform an initial or `full_state` sync, presence results for offline users are
|
||||||
|
not included by default. Setting `include_offline_users_on_sync` to `true` will always include
|
||||||
|
offline users in the results. Defaults to false.
|
||||||
|
|
||||||
---
|
---
|
||||||
### `require_auth_for_profile_requests`
|
### `require_auth_for_profile_requests`
|
||||||
|
|
||||||
@@ -504,7 +509,8 @@ Unix socket support (_Added in Synapse 1.89.0_):
|
|||||||
|
|
||||||
Valid resource names are:
|
Valid resource names are:
|
||||||
|
|
||||||
* `client`: the client-server API (/_matrix/client), and the synapse admin API (/_synapse/admin). Also implies `media` and `static`.
|
* `client`: the client-server API (/_matrix/client). Also implies `media` and `static`.
|
||||||
|
If configuring the main process, the Synapse Admin API (/_synapse/admin) is also implied.
|
||||||
|
|
||||||
* `consent`: user consent forms (/_matrix/consent). See [here](../../consent_tracking.md) for more.
|
* `consent`: user consent forms (/_matrix/consent). See [here](../../consent_tracking.md) for more.
|
||||||
|
|
||||||
@@ -1759,8 +1765,9 @@ rc_3pid_validation:
|
|||||||
### `rc_invites`
|
### `rc_invites`
|
||||||
|
|
||||||
This option sets ratelimiting how often invites can be sent in a room or to a
|
This option sets ratelimiting how often invites can be sent in a room or to a
|
||||||
specific user. `per_room` defaults to `per_second: 0.3`, `burst_count: 10` and
|
specific user. `per_room` defaults to `per_second: 0.3`, `burst_count: 10`,
|
||||||
`per_user` defaults to `per_second: 0.003`, `burst_count: 5`.
|
`per_user` defaults to `per_second: 0.003`, `burst_count: 5`, and `per_issuer`
|
||||||
|
defaults to `per_second: 0.3`, `burst_count: 10`.
|
||||||
|
|
||||||
Client requests that invite user(s) when [creating a
|
Client requests that invite user(s) when [creating a
|
||||||
room](https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3createroom)
|
room](https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3createroom)
|
||||||
@@ -1862,6 +1869,18 @@ federation_rr_transactions_per_room_per_second: 40
|
|||||||
## Media Store
|
## Media Store
|
||||||
Config options related to Synapse's media store.
|
Config options related to Synapse's media store.
|
||||||
|
|
||||||
|
---
|
||||||
|
### `enable_authenticated_media`
|
||||||
|
|
||||||
|
When set to true, all subsequent media uploads will be marked as authenticated, and will not be available over legacy
|
||||||
|
unauthenticated media endpoints (`/_matrix/media/(r0|v3|v1)/download` and `/_matrix/media/(r0|v3|v1)/thumbnail`) - requests for authenticated media over these endpoints will result in a 404. All media, including authenticated media, will be available over the authenticated media endpoints `_matrix/client/v1/media/download` and `_matrix/client/v1/media/thumbnail`. Media uploaded prior to setting this option to true will still be available over the legacy endpoints. Note if the setting is switched to false
|
||||||
|
after enabling, media marked as authenticated will be available over legacy endpoints. Defaults to false, but
|
||||||
|
this will change to true in a future Synapse release.
|
||||||
|
|
||||||
|
Example configuration:
|
||||||
|
```yaml
|
||||||
|
enable_authenticated_media: true
|
||||||
|
```
|
||||||
---
|
---
|
||||||
### `enable_media_repo`
|
### `enable_media_repo`
|
||||||
|
|
||||||
@@ -1946,6 +1965,24 @@ Example configuration:
|
|||||||
max_image_pixels: 35M
|
max_image_pixels: 35M
|
||||||
```
|
```
|
||||||
---
|
---
|
||||||
|
### `remote_media_download_burst_count`
|
||||||
|
|
||||||
|
Remote media downloads are ratelimited using a [leaky bucket algorithm](https://en.wikipedia.org/wiki/Leaky_bucket), where a given "bucket" is keyed to the IP address of the requester when requesting remote media downloads. This configuration option sets the size of the bucket against which the size in bytes of downloads are penalized - if the bucket is full, ie a given number of bytes have already been downloaded, further downloads will be denied until the bucket drains. Defaults to 500MiB. See also `remote_media_download_per_second` which determines the rate at which the "bucket" is emptied and thus has available space to authorize new requests.
|
||||||
|
|
||||||
|
Example configuration:
|
||||||
|
```yaml
|
||||||
|
remote_media_download_burst_count: 200M
|
||||||
|
```
|
||||||
|
---
|
||||||
|
### `remote_media_download_per_second`
|
||||||
|
|
||||||
|
Works in conjunction with `remote_media_download_burst_count` to ratelimit remote media downloads - this configuration option determines the rate at which the "bucket" (see above) leaks in bytes per second. As requests are made to download remote media, the size of those requests in bytes is added to the bucket, and once the bucket has reached it's capacity, no more requests will be allowed until a number of bytes has "drained" from the bucket. This setting determines the rate at which bytes drain from the bucket, with the practical effect that the larger the number, the faster the bucket leaks, allowing for more bytes downloaded over a shorter period of time. Defaults to 87KiB per second. See also `remote_media_download_burst_count`.
|
||||||
|
|
||||||
|
Example configuration:
|
||||||
|
```yaml
|
||||||
|
remote_media_download_per_second: 40K
|
||||||
|
```
|
||||||
|
---
|
||||||
### `prevent_media_downloads_from`
|
### `prevent_media_downloads_from`
|
||||||
|
|
||||||
A list of domains to never download media from. Media from these
|
A list of domains to never download media from. Media from these
|
||||||
@@ -1957,9 +1994,10 @@ This will not prevent the listed domains from accessing media themselves.
|
|||||||
It simply prevents users on this server from downloading media originating
|
It simply prevents users on this server from downloading media originating
|
||||||
from the listed servers.
|
from the listed servers.
|
||||||
|
|
||||||
This will have no effect on media originating from the local server.
|
This will have no effect on media originating from the local server. This only
|
||||||
This only affects media downloaded from other Matrix servers, to
|
affects media downloaded from other Matrix servers, to control URL previews see
|
||||||
block domains from URL previews see [`url_preview_url_blacklist`](#url_preview_url_blacklist).
|
[`url_preview_ip_range_blacklist`](#url_preview_ip_range_blacklist) or
|
||||||
|
[`url_preview_url_blacklist`](#url_preview_url_blacklist).
|
||||||
|
|
||||||
Defaults to an empty list (nothing blocked).
|
Defaults to an empty list (nothing blocked).
|
||||||
|
|
||||||
@@ -2111,12 +2149,14 @@ url_preview_ip_range_whitelist:
|
|||||||
---
|
---
|
||||||
### `url_preview_url_blacklist`
|
### `url_preview_url_blacklist`
|
||||||
|
|
||||||
Optional list of URL matches that the URL preview spider is
|
Optional list of URL matches that the URL preview spider is denied from
|
||||||
denied from accessing. You should use `url_preview_ip_range_blacklist`
|
accessing. This is a usability feature, not a security one. You should use
|
||||||
in preference to this, otherwise someone could define a public DNS
|
`url_preview_ip_range_blacklist` in preference to this, otherwise someone could
|
||||||
entry that points to a private IP address and circumvent the blacklist.
|
define a public DNS entry that points to a private IP address and circumvent
|
||||||
This is more useful if you know there is an entire shape of URL that
|
the blacklist. Applications that perform redirects or serve different content
|
||||||
you know that will never want synapse to try to spider.
|
when detecting that Synapse is accessing them can also bypass the blacklist.
|
||||||
|
This is more useful if you know there is an entire shape of URL that you know
|
||||||
|
that you do not want Synapse to preview.
|
||||||
|
|
||||||
Each list entry is a dictionary of url component attributes as returned
|
Each list entry is a dictionary of url component attributes as returned
|
||||||
by urlparse.urlsplit as applied to the absolute form of the URL. See
|
by urlparse.urlsplit as applied to the absolute form of the URL. See
|
||||||
@@ -2347,7 +2387,7 @@ enable_registration_without_verification: true
|
|||||||
---
|
---
|
||||||
### `registrations_require_3pid`
|
### `registrations_require_3pid`
|
||||||
|
|
||||||
If this is set, users must provide all of the specified types of 3PID when registering an account.
|
If this is set, users must provide all of the specified types of [3PID](https://spec.matrix.org/latest/appendices/#3pid-types) when registering an account.
|
||||||
|
|
||||||
Note that [`enable_registration`](#enable_registration) must also be set to allow account registration.
|
Note that [`enable_registration`](#enable_registration) must also be set to allow account registration.
|
||||||
|
|
||||||
@@ -2372,6 +2412,9 @@ disable_msisdn_registration: true
|
|||||||
|
|
||||||
Mandate that users are only allowed to associate certain formats of
|
Mandate that users are only allowed to associate certain formats of
|
||||||
3PIDs with accounts on this server, as specified by the `medium` and `pattern` sub-options.
|
3PIDs with accounts on this server, as specified by the `medium` and `pattern` sub-options.
|
||||||
|
`pattern` is a [Perl-like regular expression](https://docs.python.org/3/library/re.html#module-re).
|
||||||
|
|
||||||
|
More information about 3PIDs, allowed `medium` types and their `address` syntax can be found [in the Matrix spec](https://spec.matrix.org/latest/appendices/#3pid-types).
|
||||||
|
|
||||||
Example configuration:
|
Example configuration:
|
||||||
```yaml
|
```yaml
|
||||||
@@ -2381,7 +2424,7 @@ allowed_local_3pids:
|
|||||||
- medium: email
|
- medium: email
|
||||||
pattern: '^[^@]+@vector\.im$'
|
pattern: '^[^@]+@vector\.im$'
|
||||||
- medium: msisdn
|
- medium: msisdn
|
||||||
pattern: '\+44'
|
pattern: '^44\d{10}$'
|
||||||
```
|
```
|
||||||
---
|
---
|
||||||
### `enable_3pid_lookup`
|
### `enable_3pid_lookup`
|
||||||
@@ -2700,7 +2743,7 @@ Example configuration:
|
|||||||
session_lifetime: 24h
|
session_lifetime: 24h
|
||||||
```
|
```
|
||||||
---
|
---
|
||||||
### `refresh_access_token_lifetime`
|
### `refreshable_access_token_lifetime`
|
||||||
|
|
||||||
Time that an access token remains valid for, if the session is using refresh tokens.
|
Time that an access token remains valid for, if the session is using refresh tokens.
|
||||||
|
|
||||||
@@ -3260,8 +3303,8 @@ saml2_config:
|
|||||||
contact_person:
|
contact_person:
|
||||||
- given_name: Bob
|
- given_name: Bob
|
||||||
sur_name: "the Sysadmin"
|
sur_name: "the Sysadmin"
|
||||||
email_address": ["admin@example.com"]
|
email_address: ["admin@example.com"]
|
||||||
contact_type": technical
|
contact_type: technical
|
||||||
|
|
||||||
saml_session_lifetime: 5m
|
saml_session_lifetime: 5m
|
||||||
|
|
||||||
@@ -3788,7 +3831,8 @@ This setting defines options related to the user directory.
|
|||||||
This option has the following sub-options:
|
This option has the following sub-options:
|
||||||
* `enabled`: Defines whether users can search the user directory. If false then
|
* `enabled`: Defines whether users can search the user directory. If false then
|
||||||
empty responses are returned to all queries. Defaults to true.
|
empty responses are returned to all queries. Defaults to true.
|
||||||
* `search_all_users`: Defines whether to search all users visible to your HS at the time the search is performed. If set to true, will return all users who share a room with the user from the homeserver.
|
* `search_all_users`: Defines whether to search all users visible to your homeserver at the time the search is performed.
|
||||||
|
If set to true, will return all users known to the homeserver matching the search query.
|
||||||
If false, search results will only contain users
|
If false, search results will only contain users
|
||||||
visible in public rooms and users sharing a room with the requester.
|
visible in public rooms and users sharing a room with the requester.
|
||||||
Defaults to false.
|
Defaults to false.
|
||||||
@@ -4111,6 +4155,38 @@ default_power_level_content_override:
|
|||||||
trusted_private_chat: null
|
trusted_private_chat: null
|
||||||
public_chat: null
|
public_chat: null
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The default power levels for each preset are:
|
||||||
|
```yaml
|
||||||
|
"m.room.name": 50
|
||||||
|
"m.room.power_levels": 100
|
||||||
|
"m.room.history_visibility": 100
|
||||||
|
"m.room.canonical_alias": 50
|
||||||
|
"m.room.avatar": 50
|
||||||
|
"m.room.tombstone": 100
|
||||||
|
"m.room.server_acl": 100
|
||||||
|
"m.room.encryption": 100
|
||||||
|
```
|
||||||
|
|
||||||
|
So a complete example where the default power-levels for a preset are maintained
|
||||||
|
but the power level for a new key is set is:
|
||||||
|
```yaml
|
||||||
|
default_power_level_content_override:
|
||||||
|
private_chat:
|
||||||
|
events:
|
||||||
|
"com.example.foo": 0
|
||||||
|
"m.room.name": 50
|
||||||
|
"m.room.power_levels": 100
|
||||||
|
"m.room.history_visibility": 100
|
||||||
|
"m.room.canonical_alias": 50
|
||||||
|
"m.room.avatar": 50
|
||||||
|
"m.room.tombstone": 100
|
||||||
|
"m.room.server_acl": 100
|
||||||
|
"m.room.encryption": 100
|
||||||
|
trusted_private_chat: null
|
||||||
|
public_chat: null
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
### `forget_rooms_on_leave`
|
### `forget_rooms_on_leave`
|
||||||
|
|
||||||
@@ -4132,7 +4208,7 @@ By default, no room is excluded.
|
|||||||
Example configuration:
|
Example configuration:
|
||||||
```yaml
|
```yaml
|
||||||
exclude_rooms_from_sync:
|
exclude_rooms_from_sync:
|
||||||
- !foo:example.com
|
- "!foo:example.com"
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -4610,7 +4686,9 @@ This setting has the following sub-options:
|
|||||||
* `only_for_direct_messages`: Whether invites should be automatically accepted for all room types, or only
|
* `only_for_direct_messages`: Whether invites should be automatically accepted for all room types, or only
|
||||||
for direct messages. Defaults to false.
|
for direct messages. Defaults to false.
|
||||||
* `only_from_local_users`: Whether to only automatically accept invites from users on this homeserver. Defaults to false.
|
* `only_from_local_users`: Whether to only automatically accept invites from users on this homeserver. Defaults to false.
|
||||||
* `worker_to_run_on`: Which worker to run this module on. This must match the "worker_name".
|
* `worker_to_run_on`: Which worker to run this module on. This must match
|
||||||
|
the "worker_name". If not set or `null`, invites will be accepted on the
|
||||||
|
main process.
|
||||||
|
|
||||||
NOTE: Care should be taken not to enable this setting if the `synapse_auto_accept_invite` module is enabled and installed.
|
NOTE: Care should be taken not to enable this setting if the `synapse_auto_accept_invite` module is enabled and installed.
|
||||||
The two modules will compete to perform the same task and may result in undesired behaviour. For example, multiple join
|
The two modules will compete to perform the same task and may result in undesired behaviour. For example, multiple join
|
||||||
|
|||||||
@@ -62,6 +62,6 @@ following documentation:
|
|||||||
|
|
||||||
## Reporting a security vulnerability
|
## Reporting a security vulnerability
|
||||||
|
|
||||||
If you've found a security issue in Synapse or any other Matrix.org Foundation
|
If you've found a security issue in Synapse or any other Element project,
|
||||||
project, please report it to us in accordance with our [Security Disclosure
|
please report it to us in accordance with our [Security Disclosure
|
||||||
Policy](https://www.matrix.org/security-disclosure-policy/). Thank you!
|
Policy](https://element.io/security/security-disclosure-policy). Thank you!
|
||||||
|
|||||||
@@ -739,6 +739,8 @@ An example for a federation sender instance:
|
|||||||
Handles the media repository. It can handle all endpoints starting with:
|
Handles the media repository. It can handle all endpoints starting with:
|
||||||
|
|
||||||
/_matrix/media/
|
/_matrix/media/
|
||||||
|
/_matrix/client/v1/media/
|
||||||
|
/_matrix/federation/v1/media/
|
||||||
|
|
||||||
... and the following regular expressions matching media-specific administration APIs:
|
... and the following regular expressions matching media-specific administration APIs:
|
||||||
|
|
||||||
|
|||||||
3
mypy.ini
3
mypy.ini
@@ -96,3 +96,6 @@ ignore_missing_imports = True
|
|||||||
# https://github.com/twisted/treq/pull/366
|
# https://github.com/twisted/treq/pull/366
|
||||||
[mypy-treq.*]
|
[mypy-treq.*]
|
||||||
ignore_missing_imports = True
|
ignore_missing_imports = True
|
||||||
|
|
||||||
|
[mypy-multipart.*]
|
||||||
|
ignore_missing_imports = True
|
||||||
|
|||||||
1892
poetry.lock
generated
1892
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
280
pylint.cfg
280
pylint.cfg
@@ -1,280 +0,0 @@
|
|||||||
[MASTER]
|
|
||||||
|
|
||||||
# Specify a configuration file.
|
|
||||||
#rcfile=
|
|
||||||
|
|
||||||
# Python code to execute, usually for sys.path manipulation such as
|
|
||||||
# pygtk.require().
|
|
||||||
#init-hook=
|
|
||||||
|
|
||||||
# Profiled execution.
|
|
||||||
profile=no
|
|
||||||
|
|
||||||
# Add files or directories to the blacklist. They should be base names, not
|
|
||||||
# paths.
|
|
||||||
ignore=CVS
|
|
||||||
|
|
||||||
# Pickle collected data for later comparisons.
|
|
||||||
persistent=yes
|
|
||||||
|
|
||||||
# List of plugins (as comma separated values of python modules names) to load,
|
|
||||||
# usually to register additional checkers.
|
|
||||||
load-plugins=
|
|
||||||
|
|
||||||
|
|
||||||
[MESSAGES CONTROL]
|
|
||||||
|
|
||||||
# Enable the message, report, category or checker with the given id(s). You can
|
|
||||||
# either give multiple identifier separated by comma (,) or put this option
|
|
||||||
# multiple time. See also the "--disable" option for examples.
|
|
||||||
#enable=
|
|
||||||
|
|
||||||
# Disable the message, report, category or checker with the given id(s). You
|
|
||||||
# can either give multiple identifiers separated by comma (,) or put this
|
|
||||||
# option multiple times (only on the command line, not in the configuration
|
|
||||||
# file where it should appear only once).You can also use "--disable=all" to
|
|
||||||
# disable everything first and then reenable specific checks. For example, if
|
|
||||||
# you want to run only the similarities checker, you can use "--disable=all
|
|
||||||
# --enable=similarities". If you want to run only the classes checker, but have
|
|
||||||
# no Warning level messages displayed, use"--disable=all --enable=classes
|
|
||||||
# --disable=W"
|
|
||||||
disable=missing-docstring
|
|
||||||
|
|
||||||
|
|
||||||
[REPORTS]
|
|
||||||
|
|
||||||
# Set the output format. Available formats are text, parseable, colorized, msvs
|
|
||||||
# (visual studio) and html. You can also give a reporter class, eg
|
|
||||||
# mypackage.mymodule.MyReporterClass.
|
|
||||||
output-format=text
|
|
||||||
|
|
||||||
# Put messages in a separate file for each module / package specified on the
|
|
||||||
# command line instead of printing them on stdout. Reports (if any) will be
|
|
||||||
# written in a file name "pylint_global.[txt|html]".
|
|
||||||
files-output=no
|
|
||||||
|
|
||||||
# Tells whether to display a full report or only the messages
|
|
||||||
reports=yes
|
|
||||||
|
|
||||||
# Python expression which should return a note less than 10 (10 is the highest
|
|
||||||
# note). You have access to the variables errors warning, statement which
|
|
||||||
# respectively contain the number of errors / warnings messages and the total
|
|
||||||
# number of statements analyzed. This is used by the global evaluation report
|
|
||||||
# (RP0004).
|
|
||||||
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
|
|
||||||
|
|
||||||
# Add a comment according to your evaluation note. This is used by the global
|
|
||||||
# evaluation report (RP0004).
|
|
||||||
comment=no
|
|
||||||
|
|
||||||
# Template used to display messages. This is a python new-style format string
|
|
||||||
# used to format the message information. See doc for all details
|
|
||||||
#msg-template=
|
|
||||||
|
|
||||||
|
|
||||||
[TYPECHECK]
|
|
||||||
|
|
||||||
# Tells whether missing members accessed in mixin class should be ignored. A
|
|
||||||
# mixin class is detected if its name ends with "mixin" (case insensitive).
|
|
||||||
ignore-mixin-members=yes
|
|
||||||
|
|
||||||
# List of classes names for which member attributes should not be checked
|
|
||||||
# (useful for classes with attributes dynamically set).
|
|
||||||
ignored-classes=SQLObject
|
|
||||||
|
|
||||||
# When zope mode is activated, add a predefined set of Zope acquired attributes
|
|
||||||
# to generated-members.
|
|
||||||
zope=no
|
|
||||||
|
|
||||||
# List of members which are set dynamically and missed by pylint inference
|
|
||||||
# system, and so shouldn't trigger E0201 when accessed. Python regular
|
|
||||||
# expressions are accepted.
|
|
||||||
generated-members=REQUEST,acl_users,aq_parent
|
|
||||||
|
|
||||||
|
|
||||||
[MISCELLANEOUS]
|
|
||||||
|
|
||||||
# List of note tags to take in consideration, separated by a comma.
|
|
||||||
notes=FIXME,XXX,TODO
|
|
||||||
|
|
||||||
|
|
||||||
[SIMILARITIES]
|
|
||||||
|
|
||||||
# Minimum lines number of a similarity.
|
|
||||||
min-similarity-lines=4
|
|
||||||
|
|
||||||
# Ignore comments when computing similarities.
|
|
||||||
ignore-comments=yes
|
|
||||||
|
|
||||||
# Ignore docstrings when computing similarities.
|
|
||||||
ignore-docstrings=yes
|
|
||||||
|
|
||||||
# Ignore imports when computing similarities.
|
|
||||||
ignore-imports=no
|
|
||||||
|
|
||||||
|
|
||||||
[VARIABLES]
|
|
||||||
|
|
||||||
# Tells whether we should check for unused import in __init__ files.
|
|
||||||
init-import=no
|
|
||||||
|
|
||||||
# A regular expression matching the beginning of the name of dummy variables
|
|
||||||
# (i.e. not used).
|
|
||||||
dummy-variables-rgx=_$|dummy
|
|
||||||
|
|
||||||
# List of additional names supposed to be defined in builtins. Remember that
|
|
||||||
# you should avoid to define new builtins when possible.
|
|
||||||
additional-builtins=
|
|
||||||
|
|
||||||
|
|
||||||
[BASIC]
|
|
||||||
|
|
||||||
# Required attributes for module, separated by a comma
|
|
||||||
required-attributes=
|
|
||||||
|
|
||||||
# List of builtins function names that should not be used, separated by a comma
|
|
||||||
bad-functions=map,filter,apply,input
|
|
||||||
|
|
||||||
# Regular expression which should only match correct module names
|
|
||||||
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct module level names
|
|
||||||
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct class names
|
|
||||||
class-rgx=[A-Z_][a-zA-Z0-9]+$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct function names
|
|
||||||
function-rgx=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct method names
|
|
||||||
method-rgx=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct instance attribute names
|
|
||||||
attr-rgx=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct argument names
|
|
||||||
argument-rgx=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct variable names
|
|
||||||
variable-rgx=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct attribute names in class
|
|
||||||
# bodies
|
|
||||||
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct list comprehension /
|
|
||||||
# generator expression variable names
|
|
||||||
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
|
|
||||||
|
|
||||||
# Good variable names which should always be accepted, separated by a comma
|
|
||||||
good-names=i,j,k,ex,Run,_
|
|
||||||
|
|
||||||
# Bad variable names which should always be refused, separated by a comma
|
|
||||||
bad-names=foo,bar,baz,toto,tutu,tata
|
|
||||||
|
|
||||||
# Regular expression which should only match function or class names that do
|
|
||||||
# not require a docstring.
|
|
||||||
no-docstring-rgx=__.*__
|
|
||||||
|
|
||||||
# Minimum line length for functions/classes that require docstrings, shorter
|
|
||||||
# ones are exempt.
|
|
||||||
docstring-min-length=-1
|
|
||||||
|
|
||||||
|
|
||||||
[FORMAT]
|
|
||||||
|
|
||||||
# Maximum number of characters on a single line.
|
|
||||||
max-line-length=80
|
|
||||||
|
|
||||||
# Regexp for a line that is allowed to be longer than the limit.
|
|
||||||
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
|
|
||||||
|
|
||||||
# Allow the body of an if to be on the same line as the test if there is no
|
|
||||||
# else.
|
|
||||||
single-line-if-stmt=no
|
|
||||||
|
|
||||||
# List of optional constructs for which whitespace checking is disabled
|
|
||||||
no-space-check=trailing-comma,dict-separator
|
|
||||||
|
|
||||||
# Maximum number of lines in a module
|
|
||||||
max-module-lines=1000
|
|
||||||
|
|
||||||
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
|
|
||||||
# tab).
|
|
||||||
indent-string=' '
|
|
||||||
|
|
||||||
|
|
||||||
[DESIGN]
|
|
||||||
|
|
||||||
# Maximum number of arguments for function / method
|
|
||||||
max-args=5
|
|
||||||
|
|
||||||
# Argument names that match this expression will be ignored. Default to name
|
|
||||||
# with leading underscore
|
|
||||||
ignored-argument-names=_.*
|
|
||||||
|
|
||||||
# Maximum number of locals for function / method body
|
|
||||||
max-locals=15
|
|
||||||
|
|
||||||
# Maximum number of return / yield for function / method body
|
|
||||||
max-returns=6
|
|
||||||
|
|
||||||
# Maximum number of branch for function / method body
|
|
||||||
max-branches=12
|
|
||||||
|
|
||||||
# Maximum number of statements in function / method body
|
|
||||||
max-statements=50
|
|
||||||
|
|
||||||
# Maximum number of parents for a class (see R0901).
|
|
||||||
max-parents=7
|
|
||||||
|
|
||||||
# Maximum number of attributes for a class (see R0902).
|
|
||||||
max-attributes=7
|
|
||||||
|
|
||||||
# Minimum number of public methods for a class (see R0903).
|
|
||||||
min-public-methods=2
|
|
||||||
|
|
||||||
# Maximum number of public methods for a class (see R0904).
|
|
||||||
max-public-methods=20
|
|
||||||
|
|
||||||
|
|
||||||
[IMPORTS]
|
|
||||||
|
|
||||||
# Deprecated modules which should not be used, separated by a comma
|
|
||||||
deprecated-modules=regsub,TERMIOS,Bastion,rexec
|
|
||||||
|
|
||||||
# Create a graph of every (i.e. internal and external) dependencies in the
|
|
||||||
# given file (report RP0402 must not be disabled)
|
|
||||||
import-graph=
|
|
||||||
|
|
||||||
# Create a graph of external dependencies in the given file (report RP0402 must
|
|
||||||
# not be disabled)
|
|
||||||
ext-import-graph=
|
|
||||||
|
|
||||||
# Create a graph of internal dependencies in the given file (report RP0402 must
|
|
||||||
# not be disabled)
|
|
||||||
int-import-graph=
|
|
||||||
|
|
||||||
|
|
||||||
[CLASSES]
|
|
||||||
|
|
||||||
# List of interface methods to ignore, separated by a comma. This is used for
|
|
||||||
# instance to not check methods defines in Zope's Interface base class.
|
|
||||||
ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
|
|
||||||
|
|
||||||
# List of method names used to declare (i.e. assign) instance attributes.
|
|
||||||
defining-attr-methods=__init__,__new__,setUp
|
|
||||||
|
|
||||||
# List of valid names for the first argument in a class method.
|
|
||||||
valid-classmethod-first-arg=cls
|
|
||||||
|
|
||||||
# List of valid names for the first argument in a metaclass class method.
|
|
||||||
valid-metaclass-classmethod-first-arg=mcs
|
|
||||||
|
|
||||||
|
|
||||||
[EXCEPTIONS]
|
|
||||||
|
|
||||||
# Exceptions that will emit a warning when being caught. Defaults to
|
|
||||||
# "Exception"
|
|
||||||
overgeneral-exceptions=Exception
|
|
||||||
@@ -34,15 +34,11 @@
|
|||||||
name = "Internal Changes"
|
name = "Internal Changes"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[tool.black]
|
|
||||||
target-version = ['py38', 'py39', 'py310', 'py311']
|
|
||||||
# black ignores everything in .gitignore by default, see
|
|
||||||
# https://black.readthedocs.io/en/stable/usage_and_configuration/file_collection_and_discovery.html#gitignore
|
|
||||||
# Use `extend-exclude` if you want to exclude something in addition to this.
|
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
line-length = 88
|
line-length = 88
|
||||||
|
target-version = "py38"
|
||||||
|
|
||||||
|
[tool.ruff.lint]
|
||||||
# See https://beta.ruff.rs/docs/rules/#error-e
|
# See https://beta.ruff.rs/docs/rules/#error-e
|
||||||
# for error codes. The ones we ignore are:
|
# for error codes. The ones we ignore are:
|
||||||
# E501: Line too long (black enforces this for us)
|
# E501: Line too long (black enforces this for us)
|
||||||
@@ -62,6 +58,8 @@ select = [
|
|||||||
"W",
|
"W",
|
||||||
# pyflakes
|
# pyflakes
|
||||||
"F",
|
"F",
|
||||||
|
# isort
|
||||||
|
"I001",
|
||||||
# flake8-bugbear
|
# flake8-bugbear
|
||||||
"B0",
|
"B0",
|
||||||
# flake8-comprehensions
|
# flake8-comprehensions
|
||||||
@@ -78,17 +76,20 @@ select = [
|
|||||||
"EXE",
|
"EXE",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.isort]
|
[tool.ruff.lint.isort]
|
||||||
line_length = 88
|
combine-as-imports = true
|
||||||
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "TWISTED", "FIRSTPARTY", "TESTS", "LOCALFOLDER"]
|
section-order = ["future", "standard-library", "third-party", "twisted", "first-party", "testing", "local-folder"]
|
||||||
default_section = "THIRDPARTY"
|
known-first-party = ["synapse"]
|
||||||
known_first_party = ["synapse"]
|
|
||||||
known_tests = ["tests"]
|
[tool.ruff.lint.isort.sections]
|
||||||
known_twisted = ["twisted", "OpenSSL"]
|
twisted = ["twisted", "OpenSSL"]
|
||||||
multi_line_output = 3
|
testing = ["tests"]
|
||||||
include_trailing_comma = true
|
|
||||||
combine_as_imports = true
|
[tool.ruff.format]
|
||||||
skip_gitignore = true
|
quote-style = "double"
|
||||||
|
indent-style = "space"
|
||||||
|
skip-magic-trailing-comma = false
|
||||||
|
line-ending = "auto"
|
||||||
|
|
||||||
[tool.maturin]
|
[tool.maturin]
|
||||||
manifest-path = "rust/Cargo.toml"
|
manifest-path = "rust/Cargo.toml"
|
||||||
@@ -96,7 +97,7 @@ module-name = "synapse.synapse_rust"
|
|||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "matrix-synapse"
|
name = "matrix-synapse"
|
||||||
version = "1.108.0rc1"
|
version = "1.114.0"
|
||||||
description = "Homeserver for the Matrix decentralised comms protocol"
|
description = "Homeserver for the Matrix decentralised comms protocol"
|
||||||
authors = ["Matrix.org Team and Contributors <packages@matrix.org>"]
|
authors = ["Matrix.org Team and Contributors <packages@matrix.org>"]
|
||||||
license = "AGPL-3.0-or-later"
|
license = "AGPL-3.0-or-later"
|
||||||
@@ -200,10 +201,8 @@ netaddr = ">=0.7.18"
|
|||||||
# add a lower bound to the Jinja2 dependency.
|
# add a lower bound to the Jinja2 dependency.
|
||||||
Jinja2 = ">=3.0"
|
Jinja2 = ">=3.0"
|
||||||
bleach = ">=1.4.3"
|
bleach = ">=1.4.3"
|
||||||
# We use `ParamSpec` and `Concatenate`, which were added in `typing-extensions` 3.10.0.0.
|
# We use `assert_never`, which were added in `typing-extensions` 4.1.
|
||||||
# Additionally we need https://github.com/python/typing/pull/817 to allow types to be
|
typing-extensions = ">=4.1"
|
||||||
# generic over ParamSpecs.
|
|
||||||
typing-extensions = ">=3.10.0.1"
|
|
||||||
# We enforce that we have a `cryptography` version that bundles an `openssl`
|
# We enforce that we have a `cryptography` version that bundles an `openssl`
|
||||||
# with the latest security patches.
|
# with the latest security patches.
|
||||||
cryptography = ">=3.4.7"
|
cryptography = ">=3.4.7"
|
||||||
@@ -226,6 +225,8 @@ pydantic = ">=1.7.4, <3"
|
|||||||
# needed.
|
# needed.
|
||||||
setuptools_rust = ">=1.3"
|
setuptools_rust = ">=1.3"
|
||||||
|
|
||||||
|
# This is used for parsing multipart responses
|
||||||
|
python-multipart = ">=0.0.9"
|
||||||
|
|
||||||
# Optional Dependencies
|
# Optional Dependencies
|
||||||
# ---------------------
|
# ---------------------
|
||||||
@@ -319,9 +320,7 @@ all = [
|
|||||||
# failing on new releases. Keeping lower bounds loose here means that dependabot
|
# failing on new releases. Keeping lower bounds loose here means that dependabot
|
||||||
# can bump versions without having to update the content-hash in the lockfile.
|
# can bump versions without having to update the content-hash in the lockfile.
|
||||||
# This helps prevents merge conflicts when running a batch of dependabot updates.
|
# This helps prevents merge conflicts when running a batch of dependabot updates.
|
||||||
isort = ">=5.10.1"
|
ruff = "0.6.2"
|
||||||
black = ">=22.7.0"
|
|
||||||
ruff = "0.3.7"
|
|
||||||
# Type checking only works with the pydantic.v1 compat module from pydantic v2
|
# Type checking only works with the pydantic.v1 compat module from pydantic v2
|
||||||
pydantic = "^2"
|
pydantic = "^2"
|
||||||
|
|
||||||
|
|||||||
@@ -204,6 +204,8 @@ pub struct EventInternalMetadata {
|
|||||||
/// The stream ordering of this event. None, until it has been persisted.
|
/// The stream ordering of this event. None, until it has been persisted.
|
||||||
#[pyo3(get, set)]
|
#[pyo3(get, set)]
|
||||||
stream_ordering: Option<NonZeroI64>,
|
stream_ordering: Option<NonZeroI64>,
|
||||||
|
#[pyo3(get, set)]
|
||||||
|
instance_name: Option<String>,
|
||||||
|
|
||||||
/// whether this event is an outlier (ie, whether we have the state at that
|
/// whether this event is an outlier (ie, whether we have the state at that
|
||||||
/// point in the DAG)
|
/// point in the DAG)
|
||||||
@@ -232,6 +234,7 @@ impl EventInternalMetadata {
|
|||||||
Ok(EventInternalMetadata {
|
Ok(EventInternalMetadata {
|
||||||
data,
|
data,
|
||||||
stream_ordering: None,
|
stream_ordering: None,
|
||||||
|
instance_name: None,
|
||||||
outlier: false,
|
outlier: false,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ Pydantic does not yet offer a strict mode, but it is planned for pydantic v2. Se
|
|||||||
until then, this script is a best effort to stop us from introducing type coersion bugs
|
until then, this script is a best effort to stop us from introducing type coersion bugs
|
||||||
(like the infamous stringy power levels fixed in room version 10).
|
(like the infamous stringy power levels fixed in room version 10).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import contextlib
|
import contextlib
|
||||||
import functools
|
import functools
|
||||||
|
|||||||
@@ -223,7 +223,6 @@ test_packages=(
|
|||||||
./tests/msc3930
|
./tests/msc3930
|
||||||
./tests/msc3902
|
./tests/msc3902
|
||||||
./tests/msc3967
|
./tests/msc3967
|
||||||
./tests/msc4115
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Enable dirty runs, so tests will reuse the same container where possible.
|
# Enable dirty runs, so tests will reuse the same container where possible.
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ import argparse
|
|||||||
import base64
|
import base64
|
||||||
import json
|
import json
|
||||||
import sys
|
import sys
|
||||||
from typing import Any, Dict, Optional, Tuple
|
from typing import Any, Dict, Mapping, Optional, Tuple, Union
|
||||||
from urllib import parse as urlparse
|
from urllib import parse as urlparse
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
@@ -75,7 +75,7 @@ def encode_canonical_json(value: object) -> bytes:
|
|||||||
value,
|
value,
|
||||||
# Encode code-points outside of ASCII as UTF-8 rather than \u escapes
|
# Encode code-points outside of ASCII as UTF-8 rather than \u escapes
|
||||||
ensure_ascii=False,
|
ensure_ascii=False,
|
||||||
# Remove unecessary white space.
|
# Remove unnecessary white space.
|
||||||
separators=(",", ":"),
|
separators=(",", ":"),
|
||||||
# Sort the keys of dictionaries.
|
# Sort the keys of dictionaries.
|
||||||
sort_keys=True,
|
sort_keys=True,
|
||||||
@@ -298,12 +298,23 @@ class MatrixConnectionAdapter(HTTPAdapter):
|
|||||||
|
|
||||||
return super().send(request, *args, **kwargs)
|
return super().send(request, *args, **kwargs)
|
||||||
|
|
||||||
def get_connection(
|
def get_connection_with_tls_context(
|
||||||
self, url: str, proxies: Optional[Dict[str, str]] = None
|
self,
|
||||||
|
request: PreparedRequest,
|
||||||
|
verify: Optional[Union[bool, str]],
|
||||||
|
proxies: Optional[Mapping[str, str]] = None,
|
||||||
|
cert: Optional[Union[Tuple[str, str], str]] = None,
|
||||||
) -> HTTPConnectionPool:
|
) -> HTTPConnectionPool:
|
||||||
# overrides the get_connection() method in the base class
|
# overrides the get_connection_with_tls_context() method in the base class
|
||||||
parsed = urlparse.urlsplit(url)
|
parsed = urlparse.urlsplit(request.url)
|
||||||
(host, port, ssl_server_name) = self._lookup(parsed.netloc)
|
|
||||||
|
# Extract the server name from the request URL, and ensure it's a str.
|
||||||
|
hostname = parsed.netloc
|
||||||
|
if isinstance(hostname, bytes):
|
||||||
|
hostname = hostname.decode("utf-8")
|
||||||
|
assert isinstance(hostname, str)
|
||||||
|
|
||||||
|
(host, port, ssl_server_name) = self._lookup(hostname)
|
||||||
print(
|
print(
|
||||||
f"Connecting to {host}:{port} with SNI {ssl_server_name}", file=sys.stderr
|
f"Connecting to {host}:{port} with SNI {ssl_server_name}", file=sys.stderr
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Runs linting scripts over the local Synapse checkout
|
# Runs linting scripts over the local Synapse checkout
|
||||||
# black - opinionated code formatter
|
|
||||||
# ruff - lints and finds mistakes
|
# ruff - lints and finds mistakes
|
||||||
|
# mypy - typechecks python code
|
||||||
|
# cargo clippy - lints rust code
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -101,18 +102,15 @@ echo
|
|||||||
# Print out the commands being run
|
# Print out the commands being run
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
# Ensure the sort order of imports.
|
|
||||||
isort "${files[@]}"
|
|
||||||
|
|
||||||
# Ensure Python code conforms to an opinionated style.
|
|
||||||
python3 -m black "${files[@]}"
|
|
||||||
|
|
||||||
# Ensure the sample configuration file conforms to style checks.
|
# Ensure the sample configuration file conforms to style checks.
|
||||||
./scripts-dev/config-lint.sh
|
./scripts-dev/config-lint.sh
|
||||||
|
|
||||||
# Catch any common programming mistakes in Python code.
|
# Catch any common programming mistakes in Python code.
|
||||||
# --quiet suppresses the update check.
|
# --quiet suppresses the update check.
|
||||||
ruff --quiet --fix "${files[@]}"
|
ruff check --quiet --fix "${files[@]}"
|
||||||
|
|
||||||
|
# Reformat Python code.
|
||||||
|
ruff format --quiet "${files[@]}"
|
||||||
|
|
||||||
# Catch any common programming mistakes in Rust code.
|
# Catch any common programming mistakes in Rust code.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ from mypy.types import (
|
|||||||
NoneType,
|
NoneType,
|
||||||
TupleType,
|
TupleType,
|
||||||
TypeAliasType,
|
TypeAliasType,
|
||||||
|
TypeVarType,
|
||||||
UninhabitedType,
|
UninhabitedType,
|
||||||
UnionType,
|
UnionType,
|
||||||
)
|
)
|
||||||
@@ -233,6 +234,7 @@ IMMUTABLE_CUSTOM_TYPES = {
|
|||||||
"synapse.synapse_rust.push.FilteredPushRules",
|
"synapse.synapse_rust.push.FilteredPushRules",
|
||||||
# This is technically not immutable, but close enough.
|
# This is technically not immutable, but close enough.
|
||||||
"signedjson.types.VerifyKey",
|
"signedjson.types.VerifyKey",
|
||||||
|
"synapse.types.StrCollection",
|
||||||
}
|
}
|
||||||
|
|
||||||
# Immutable containers only if the values are also immutable.
|
# Immutable containers only if the values are also immutable.
|
||||||
@@ -298,7 +300,7 @@ def is_cacheable(
|
|||||||
|
|
||||||
elif rt.type.fullname in MUTABLE_CONTAINER_TYPES:
|
elif rt.type.fullname in MUTABLE_CONTAINER_TYPES:
|
||||||
# Mutable containers are mutable regardless of their underlying type.
|
# Mutable containers are mutable regardless of their underlying type.
|
||||||
return False, None
|
return False, f"container {rt.type.fullname} is mutable"
|
||||||
|
|
||||||
elif "attrs" in rt.type.metadata:
|
elif "attrs" in rt.type.metadata:
|
||||||
# attrs classes are only cachable iff it is frozen (immutable itself)
|
# attrs classes are only cachable iff it is frozen (immutable itself)
|
||||||
@@ -318,6 +320,9 @@ def is_cacheable(
|
|||||||
else:
|
else:
|
||||||
return False, "non-frozen attrs class"
|
return False, "non-frozen attrs class"
|
||||||
|
|
||||||
|
elif rt.type.is_enum:
|
||||||
|
# We assume Enum values are immutable
|
||||||
|
return True, None
|
||||||
else:
|
else:
|
||||||
# Ensure we fail for unknown types, these generally means that the
|
# Ensure we fail for unknown types, these generally means that the
|
||||||
# above code is not complete.
|
# above code is not complete.
|
||||||
@@ -326,6 +331,18 @@ def is_cacheable(
|
|||||||
f"Don't know how to handle {rt.type.fullname} return type instance",
|
f"Don't know how to handle {rt.type.fullname} return type instance",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
elif isinstance(rt, TypeVarType):
|
||||||
|
# We consider TypeVars immutable if they are bound to a set of immutable
|
||||||
|
# types.
|
||||||
|
if rt.values:
|
||||||
|
for value in rt.values:
|
||||||
|
ok, note = is_cacheable(value, signature, verbose)
|
||||||
|
if not ok:
|
||||||
|
return False, f"TypeVar bound not cacheable {value}"
|
||||||
|
return True, None
|
||||||
|
|
||||||
|
return False, "TypeVar is unbound"
|
||||||
|
|
||||||
elif isinstance(rt, NoneType):
|
elif isinstance(rt, NoneType):
|
||||||
# None is cachable.
|
# None is cachable.
|
||||||
return True, None
|
return True, None
|
||||||
|
|||||||
@@ -20,8 +20,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
"""An interactive script for doing a release. See `cli()` below.
|
"""An interactive script for doing a release. See `cli()` below."""
|
||||||
"""
|
|
||||||
|
|
||||||
import glob
|
import glob
|
||||||
import json
|
import json
|
||||||
@@ -70,6 +69,7 @@ def cli() -> None:
|
|||||||
pip install -e .[dev]
|
pip install -e .[dev]
|
||||||
|
|
||||||
- A checkout of the sytest repository at ../sytest
|
- A checkout of the sytest repository at ../sytest
|
||||||
|
- A checkout of the complement repository at ../complement
|
||||||
|
|
||||||
Then to use:
|
Then to use:
|
||||||
|
|
||||||
@@ -112,10 +112,12 @@ def _prepare() -> None:
|
|||||||
# Make sure we're in a git repo.
|
# Make sure we're in a git repo.
|
||||||
synapse_repo = get_repo_and_check_clean_checkout()
|
synapse_repo = get_repo_and_check_clean_checkout()
|
||||||
sytest_repo = get_repo_and_check_clean_checkout("../sytest", "sytest")
|
sytest_repo = get_repo_and_check_clean_checkout("../sytest", "sytest")
|
||||||
|
complement_repo = get_repo_and_check_clean_checkout("../complement", "complement")
|
||||||
|
|
||||||
click.secho("Updating Synapse and Sytest git repos...")
|
click.secho("Updating Synapse and Sytest git repos...")
|
||||||
synapse_repo.remote().fetch()
|
synapse_repo.remote().fetch()
|
||||||
sytest_repo.remote().fetch()
|
sytest_repo.remote().fetch()
|
||||||
|
complement_repo.remote().fetch()
|
||||||
|
|
||||||
# Get the current version and AST from root Synapse module.
|
# Get the current version and AST from root Synapse module.
|
||||||
current_version = get_package_version()
|
current_version = get_package_version()
|
||||||
@@ -208,7 +210,15 @@ def _prepare() -> None:
|
|||||||
"Which branch should the release be based on?", default=default
|
"Which branch should the release be based on?", default=default
|
||||||
)
|
)
|
||||||
|
|
||||||
for repo_name, repo in {"synapse": synapse_repo, "sytest": sytest_repo}.items():
|
for repo_name, repo in {
|
||||||
|
"synapse": synapse_repo,
|
||||||
|
"sytest": sytest_repo,
|
||||||
|
"complement": complement_repo,
|
||||||
|
}.items():
|
||||||
|
# Special case for Complement: `develop` maps to `main`
|
||||||
|
if repo_name == "complement" and branch_name == "develop":
|
||||||
|
branch_name = "main"
|
||||||
|
|
||||||
base_branch = find_ref(repo, branch_name)
|
base_branch = find_ref(repo, branch_name)
|
||||||
if not base_branch:
|
if not base_branch:
|
||||||
print(f"Could not find base branch {branch_name} for {repo_name}!")
|
print(f"Could not find base branch {branch_name} for {repo_name}!")
|
||||||
@@ -231,6 +241,12 @@ def _prepare() -> None:
|
|||||||
if click.confirm("Push new SyTest branch?", default=True):
|
if click.confirm("Push new SyTest branch?", default=True):
|
||||||
sytest_repo.git.push("-u", sytest_repo.remote().name, release_branch_name)
|
sytest_repo.git.push("-u", sytest_repo.remote().name, release_branch_name)
|
||||||
|
|
||||||
|
# Same for Complement
|
||||||
|
if click.confirm("Push new Complement branch?", default=True):
|
||||||
|
complement_repo.git.push(
|
||||||
|
"-u", complement_repo.remote().name, release_branch_name
|
||||||
|
)
|
||||||
|
|
||||||
# Switch to the release branch and ensure it's up to date.
|
# Switch to the release branch and ensure it's up to date.
|
||||||
synapse_repo.git.checkout(release_branch_name)
|
synapse_repo.git.checkout(release_branch_name)
|
||||||
update_branch(synapse_repo)
|
update_branch(synapse_repo)
|
||||||
@@ -307,6 +323,11 @@ def tag(gh_token: Optional[str]) -> None:
|
|||||||
def _tag(gh_token: Optional[str]) -> None:
|
def _tag(gh_token: Optional[str]) -> None:
|
||||||
"""Tags the release and generates a draft GitHub release"""
|
"""Tags the release and generates a draft GitHub release"""
|
||||||
|
|
||||||
|
if gh_token:
|
||||||
|
# Test that the GH Token is valid before continuing.
|
||||||
|
gh = Github(gh_token)
|
||||||
|
gh.get_user()
|
||||||
|
|
||||||
# Make sure we're in a git repo.
|
# Make sure we're in a git repo.
|
||||||
repo = get_repo_and_check_clean_checkout()
|
repo = get_repo_and_check_clean_checkout()
|
||||||
|
|
||||||
@@ -401,6 +422,11 @@ def publish(gh_token: str) -> None:
|
|||||||
def _publish(gh_token: str) -> None:
|
def _publish(gh_token: str) -> None:
|
||||||
"""Publish release on GitHub."""
|
"""Publish release on GitHub."""
|
||||||
|
|
||||||
|
if gh_token:
|
||||||
|
# Test that the GH Token is valid before continuing.
|
||||||
|
gh = Github(gh_token)
|
||||||
|
gh.get_user()
|
||||||
|
|
||||||
# Make sure we're in a git repo.
|
# Make sure we're in a git repo.
|
||||||
get_repo_and_check_clean_checkout()
|
get_repo_and_check_clean_checkout()
|
||||||
|
|
||||||
@@ -443,6 +469,11 @@ def upload(gh_token: Optional[str]) -> None:
|
|||||||
def _upload(gh_token: Optional[str]) -> None:
|
def _upload(gh_token: Optional[str]) -> None:
|
||||||
"""Upload release to pypi."""
|
"""Upload release to pypi."""
|
||||||
|
|
||||||
|
if gh_token:
|
||||||
|
# Test that the GH Token is valid before continuing.
|
||||||
|
gh = Github(gh_token)
|
||||||
|
gh.get_user()
|
||||||
|
|
||||||
current_version = get_package_version()
|
current_version = get_package_version()
|
||||||
tag_name = f"v{current_version}"
|
tag_name = f"v{current_version}"
|
||||||
|
|
||||||
@@ -538,6 +569,11 @@ def wait_for_actions(gh_token: Optional[str]) -> None:
|
|||||||
|
|
||||||
|
|
||||||
def _wait_for_actions(gh_token: Optional[str]) -> None:
|
def _wait_for_actions(gh_token: Optional[str]) -> None:
|
||||||
|
if gh_token:
|
||||||
|
# Test that the GH Token is valid before continuing.
|
||||||
|
gh = Github(gh_token)
|
||||||
|
gh.get_user()
|
||||||
|
|
||||||
# Find out the version and tag name.
|
# Find out the version and tag name.
|
||||||
current_version = get_package_version()
|
current_version = get_package_version()
|
||||||
tag_name = f"v{current_version}"
|
tag_name = f"v{current_version}"
|
||||||
@@ -630,6 +666,9 @@ def _merge_back() -> None:
|
|||||||
else:
|
else:
|
||||||
# Full release
|
# Full release
|
||||||
sytest_repo = get_repo_and_check_clean_checkout("../sytest", "sytest")
|
sytest_repo = get_repo_and_check_clean_checkout("../sytest", "sytest")
|
||||||
|
complement_repo = get_repo_and_check_clean_checkout(
|
||||||
|
"../complement", "complement"
|
||||||
|
)
|
||||||
|
|
||||||
if click.confirm(f"Merge {branch_name} → master?", default=True):
|
if click.confirm(f"Merge {branch_name} → master?", default=True):
|
||||||
_merge_into(synapse_repo, branch_name, "master")
|
_merge_into(synapse_repo, branch_name, "master")
|
||||||
@@ -643,6 +682,9 @@ def _merge_back() -> None:
|
|||||||
if click.confirm("On SyTest, merge master → develop?", default=True):
|
if click.confirm("On SyTest, merge master → develop?", default=True):
|
||||||
_merge_into(sytest_repo, "master", "develop")
|
_merge_into(sytest_repo, "master", "develop")
|
||||||
|
|
||||||
|
if click.confirm(f"On Complement, merge {branch_name} → main?", default=True):
|
||||||
|
_merge_into(complement_repo, branch_name, "main")
|
||||||
|
|
||||||
|
|
||||||
@cli.command()
|
@cli.command()
|
||||||
def announce() -> None:
|
def announce() -> None:
|
||||||
@@ -688,6 +730,11 @@ Ask the designated people to do the blog and tweets."""
|
|||||||
@cli.command()
|
@cli.command()
|
||||||
@click.option("--gh-token", envvar=["GH_TOKEN", "GITHUB_TOKEN"], required=True)
|
@click.option("--gh-token", envvar=["GH_TOKEN", "GITHUB_TOKEN"], required=True)
|
||||||
def full(gh_token: str) -> None:
|
def full(gh_token: str) -> None:
|
||||||
|
if gh_token:
|
||||||
|
# Test that the GH Token is valid before continuing.
|
||||||
|
gh = Github(gh_token)
|
||||||
|
gh.get_user()
|
||||||
|
|
||||||
click.echo("1. If this is a security release, read the security wiki page.")
|
click.echo("1. If this is a security release, read the security wiki page.")
|
||||||
click.echo("2. Check for any release blockers before proceeding.")
|
click.echo("2. Check for any release blockers before proceeding.")
|
||||||
click.echo(" https://github.com/element-hq/synapse/labels/X-Release-Blocker")
|
click.echo(" https://github.com/element-hq/synapse/labels/X-Release-Blocker")
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
"""Contains *incomplete* type hints for txredisapi.
|
"""Contains *incomplete* type hints for txredisapi."""
|
||||||
"""
|
|
||||||
from typing import Any, List, Optional, Type, Union
|
from typing import Any, List, Optional, Type, Union
|
||||||
|
|
||||||
from twisted.internet import protocol
|
from twisted.internet import protocol
|
||||||
|
|||||||
@@ -20,8 +20,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
""" This is an implementation of a Matrix homeserver.
|
"""This is an implementation of a Matrix homeserver."""
|
||||||
"""
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ logger = logging.getLogger("generate_workers_map")
|
|||||||
|
|
||||||
|
|
||||||
class MockHomeserver(HomeServer):
|
class MockHomeserver(HomeServer):
|
||||||
DATASTORE_CLASS = DataStore # type: ignore
|
DATASTORE_CLASS = DataStore
|
||||||
|
|
||||||
def __init__(self, config: HomeServerConfig, worker_app: Optional[str]) -> None:
|
def __init__(self, config: HomeServerConfig, worker_app: Optional[str]) -> None:
|
||||||
super().__init__(config.server.server_name, config=config)
|
super().__init__(config.server.server_name, config=config)
|
||||||
@@ -171,7 +171,7 @@ def elide_http_methods_if_unconflicting(
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def paths_to_methods_dict(
|
def paths_to_methods_dict(
|
||||||
methods_and_paths: Iterable[Tuple[str, str]]
|
methods_and_paths: Iterable[Tuple[str, str]],
|
||||||
) -> Dict[str, Set[str]]:
|
) -> Dict[str, Set[str]]:
|
||||||
"""
|
"""
|
||||||
Given (method, path) pairs, produces a dict from path to set of methods
|
Given (method, path) pairs, produces a dict from path to set of methods
|
||||||
@@ -201,7 +201,7 @@ def elide_http_methods_if_unconflicting(
|
|||||||
|
|
||||||
|
|
||||||
def simplify_path_regexes(
|
def simplify_path_regexes(
|
||||||
registrations: Dict[Tuple[str, str], EndpointDescription]
|
registrations: Dict[Tuple[str, str], EndpointDescription],
|
||||||
) -> Dict[Tuple[str, str], EndpointDescription]:
|
) -> Dict[Tuple[str, str], EndpointDescription]:
|
||||||
"""
|
"""
|
||||||
Simplify all the path regexes for the dict of endpoint descriptions,
|
Simplify all the path regexes for the dict of endpoint descriptions,
|
||||||
|
|||||||
@@ -56,7 +56,9 @@ def main() -> None:
|
|||||||
password_pepper = password_config.get("pepper", password_pepper)
|
password_pepper = password_config.get("pepper", password_pepper)
|
||||||
password = args.password
|
password = args.password
|
||||||
|
|
||||||
if not password:
|
if not password and not sys.stdin.isatty():
|
||||||
|
password = sys.stdin.readline().strip()
|
||||||
|
elif not password:
|
||||||
password = prompt_for_pass()
|
password = prompt_for_pass()
|
||||||
|
|
||||||
# On Python 2, make sure we decode it to Unicode before we normalise it
|
# On Python 2, make sure we decode it to Unicode before we normalise it
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ def request_registration(
|
|||||||
user_type: Optional[str] = None,
|
user_type: Optional[str] = None,
|
||||||
_print: Callable[[str], None] = print,
|
_print: Callable[[str], None] = print,
|
||||||
exit: Callable[[int], None] = sys.exit,
|
exit: Callable[[int], None] = sys.exit,
|
||||||
|
exists_ok: bool = False,
|
||||||
) -> None:
|
) -> None:
|
||||||
url = "%s/_synapse/admin/v1/register" % (server_location.rstrip("/"),)
|
url = "%s/_synapse/admin/v1/register" % (server_location.rstrip("/"),)
|
||||||
|
|
||||||
@@ -97,6 +98,10 @@ def request_registration(
|
|||||||
r = requests.post(url, json=data)
|
r = requests.post(url, json=data)
|
||||||
|
|
||||||
if r.status_code != 200:
|
if r.status_code != 200:
|
||||||
|
response = r.json()
|
||||||
|
if exists_ok and response["errcode"] == "M_USER_IN_USE":
|
||||||
|
_print("User already exists. Skipping.")
|
||||||
|
return
|
||||||
_print("ERROR! Received %d %s" % (r.status_code, r.reason))
|
_print("ERROR! Received %d %s" % (r.status_code, r.reason))
|
||||||
if 400 <= r.status_code < 500:
|
if 400 <= r.status_code < 500:
|
||||||
try:
|
try:
|
||||||
@@ -115,6 +120,7 @@ def register_new_user(
|
|||||||
shared_secret: str,
|
shared_secret: str,
|
||||||
admin: Optional[bool],
|
admin: Optional[bool],
|
||||||
user_type: Optional[str],
|
user_type: Optional[str],
|
||||||
|
exists_ok: bool = False,
|
||||||
) -> None:
|
) -> None:
|
||||||
if not user:
|
if not user:
|
||||||
try:
|
try:
|
||||||
@@ -154,7 +160,13 @@ def register_new_user(
|
|||||||
admin = False
|
admin = False
|
||||||
|
|
||||||
request_registration(
|
request_registration(
|
||||||
user, password, server_location, shared_secret, bool(admin), user_type
|
user,
|
||||||
|
password,
|
||||||
|
server_location,
|
||||||
|
shared_secret,
|
||||||
|
bool(admin),
|
||||||
|
user_type,
|
||||||
|
exists_ok=exists_ok,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -174,10 +186,22 @@ def main() -> None:
|
|||||||
help="Local part of the new user. Will prompt if omitted.",
|
help="Local part of the new user. Will prompt if omitted.",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
"--exists-ok",
|
||||||
|
action="store_true",
|
||||||
|
help="Do not fail if user already exists.",
|
||||||
|
)
|
||||||
|
password_group = parser.add_mutually_exclusive_group()
|
||||||
|
password_group.add_argument(
|
||||||
"-p",
|
"-p",
|
||||||
"--password",
|
"--password",
|
||||||
default=None,
|
default=None,
|
||||||
help="New password for user. Will prompt if omitted.",
|
help="New password for user. Will prompt for a password if "
|
||||||
|
"this flag and `--password-file` are both omitted.",
|
||||||
|
)
|
||||||
|
password_group.add_argument(
|
||||||
|
"--password-file",
|
||||||
|
default=None,
|
||||||
|
help="File containing the new password for user. If set, will override `--password`.",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-t",
|
"-t",
|
||||||
@@ -185,6 +209,7 @@ def main() -> None:
|
|||||||
default=None,
|
default=None,
|
||||||
help="User type as specified in synapse.api.constants.UserTypes",
|
help="User type as specified in synapse.api.constants.UserTypes",
|
||||||
)
|
)
|
||||||
|
|
||||||
admin_group = parser.add_mutually_exclusive_group()
|
admin_group = parser.add_mutually_exclusive_group()
|
||||||
admin_group.add_argument(
|
admin_group.add_argument(
|
||||||
"-a",
|
"-a",
|
||||||
@@ -247,6 +272,11 @@ def main() -> None:
|
|||||||
print(_NO_SHARED_SECRET_OPTS_ERROR, file=sys.stderr)
|
print(_NO_SHARED_SECRET_OPTS_ERROR, file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
if args.password_file:
|
||||||
|
password = _read_file(args.password_file, "password-file").strip()
|
||||||
|
else:
|
||||||
|
password = args.password
|
||||||
|
|
||||||
if args.server_url:
|
if args.server_url:
|
||||||
server_url = args.server_url
|
server_url = args.server_url
|
||||||
elif config is not None:
|
elif config is not None:
|
||||||
@@ -270,7 +300,13 @@ def main() -> None:
|
|||||||
admin = args.admin
|
admin = args.admin
|
||||||
|
|
||||||
register_new_user(
|
register_new_user(
|
||||||
args.user, args.password, server_url, secret, admin, args.user_type
|
args.user,
|
||||||
|
password,
|
||||||
|
server_url,
|
||||||
|
secret,
|
||||||
|
admin,
|
||||||
|
args.user_type,
|
||||||
|
exists_ok=args.exists_ok,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ from synapse.storage.engines import create_engine
|
|||||||
|
|
||||||
class ReviewConfig(RootConfig):
|
class ReviewConfig(RootConfig):
|
||||||
"A config class that just pulls out the database config"
|
"A config class that just pulls out the database config"
|
||||||
|
|
||||||
config_classes = [DatabaseConfig]
|
config_classes = [DatabaseConfig]
|
||||||
|
|
||||||
|
|
||||||
@@ -160,7 +161,11 @@ def main() -> None:
|
|||||||
|
|
||||||
with make_conn(database_config, engine, "review_recent_signups") as db_conn:
|
with make_conn(database_config, engine, "review_recent_signups") as db_conn:
|
||||||
# This generates a type of Cursor, not LoggingTransaction.
|
# This generates a type of Cursor, not LoggingTransaction.
|
||||||
user_infos = get_recent_users(db_conn.cursor(), since_ms, exclude_users_with_appservice) # type: ignore[arg-type]
|
user_infos = get_recent_users(
|
||||||
|
db_conn.cursor(),
|
||||||
|
since_ms, # type: ignore[arg-type]
|
||||||
|
exclude_users_with_appservice,
|
||||||
|
)
|
||||||
|
|
||||||
for user_info in user_infos:
|
for user_info in user_infos:
|
||||||
if exclude_users_with_email and user_info.emails:
|
if exclude_users_with_email and user_info.emails:
|
||||||
|
|||||||
@@ -119,18 +119,24 @@ BOOLEAN_COLUMNS = {
|
|||||||
"e2e_room_keys": ["is_verified"],
|
"e2e_room_keys": ["is_verified"],
|
||||||
"event_edges": ["is_state"],
|
"event_edges": ["is_state"],
|
||||||
"events": ["processed", "outlier", "contains_url"],
|
"events": ["processed", "outlier", "contains_url"],
|
||||||
"local_media_repository": ["safe_from_quarantine"],
|
"local_media_repository": ["safe_from_quarantine", "authenticated"],
|
||||||
|
"per_user_experimental_features": ["enabled"],
|
||||||
"presence_list": ["accepted"],
|
"presence_list": ["accepted"],
|
||||||
"presence_stream": ["currently_active"],
|
"presence_stream": ["currently_active"],
|
||||||
"public_room_list_stream": ["visibility"],
|
"public_room_list_stream": ["visibility"],
|
||||||
"pushers": ["enabled"],
|
"pushers": ["enabled"],
|
||||||
"redactions": ["have_censored"],
|
"redactions": ["have_censored"],
|
||||||
|
"remote_media_cache": ["authenticated"],
|
||||||
"room_stats_state": ["is_federatable"],
|
"room_stats_state": ["is_federatable"],
|
||||||
"rooms": ["is_public", "has_auth_chain_index"],
|
"rooms": ["is_public", "has_auth_chain_index"],
|
||||||
|
"sliding_sync_joined_rooms": ["is_encrypted"],
|
||||||
|
"sliding_sync_membership_snapshots": [
|
||||||
|
"has_known_state",
|
||||||
|
"is_encrypted",
|
||||||
|
],
|
||||||
"users": ["shadow_banned", "approved", "locked", "suspended"],
|
"users": ["shadow_banned", "approved", "locked", "suspended"],
|
||||||
"un_partial_stated_event_stream": ["rejection_status_changed"],
|
"un_partial_stated_event_stream": ["rejection_status_changed"],
|
||||||
"users_who_share_rooms": ["share_private"],
|
"users_who_share_rooms": ["share_private"],
|
||||||
"per_user_experimental_features": ["enabled"],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -711,9 +717,7 @@ class Porter:
|
|||||||
return
|
return
|
||||||
|
|
||||||
# Check if all background updates are done, abort if not.
|
# Check if all background updates are done, abort if not.
|
||||||
updates_complete = (
|
updates_complete = await self.sqlite_store.db_pool.updates.has_completed_background_updates()
|
||||||
await self.sqlite_store.db_pool.updates.has_completed_background_updates()
|
|
||||||
)
|
|
||||||
if not updates_complete:
|
if not updates_complete:
|
||||||
end_error = (
|
end_error = (
|
||||||
"Pending background updates exist in the SQLite3 database."
|
"Pending background updates exist in the SQLite3 database."
|
||||||
@@ -777,22 +781,74 @@ class Porter:
|
|||||||
await self._setup_events_stream_seqs()
|
await self._setup_events_stream_seqs()
|
||||||
await self._setup_sequence(
|
await self._setup_sequence(
|
||||||
"un_partial_stated_event_stream_sequence",
|
"un_partial_stated_event_stream_sequence",
|
||||||
("un_partial_stated_event_stream",),
|
[("un_partial_stated_event_stream", "stream_id")],
|
||||||
)
|
)
|
||||||
await self._setup_sequence(
|
await self._setup_sequence(
|
||||||
"device_inbox_sequence", ("device_inbox", "device_federation_outbox")
|
"device_inbox_sequence",
|
||||||
|
[
|
||||||
|
("device_inbox", "stream_id"),
|
||||||
|
("device_federation_outbox", "stream_id"),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
await self._setup_sequence(
|
await self._setup_sequence(
|
||||||
"account_data_sequence",
|
"account_data_sequence",
|
||||||
("room_account_data", "room_tags_revisions", "account_data"),
|
[
|
||||||
|
("room_account_data", "stream_id"),
|
||||||
|
("room_tags_revisions", "stream_id"),
|
||||||
|
("account_data", "stream_id"),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
await self._setup_sequence(
|
||||||
|
"receipts_sequence",
|
||||||
|
[
|
||||||
|
("receipts_linearized", "stream_id"),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
await self._setup_sequence(
|
||||||
|
"presence_stream_sequence",
|
||||||
|
[
|
||||||
|
("presence_stream", "stream_id"),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
await self._setup_sequence("receipts_sequence", ("receipts_linearized",))
|
|
||||||
await self._setup_sequence("presence_stream_sequence", ("presence_stream",))
|
|
||||||
await self._setup_auth_chain_sequence()
|
await self._setup_auth_chain_sequence()
|
||||||
await self._setup_sequence(
|
await self._setup_sequence(
|
||||||
"application_services_txn_id_seq",
|
"application_services_txn_id_seq",
|
||||||
("application_services_txns",),
|
[
|
||||||
"txn_id",
|
(
|
||||||
|
"application_services_txns",
|
||||||
|
"txn_id",
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
await self._setup_sequence(
|
||||||
|
"device_lists_sequence",
|
||||||
|
[
|
||||||
|
("device_lists_stream", "stream_id"),
|
||||||
|
("user_signature_stream", "stream_id"),
|
||||||
|
("device_lists_outbound_pokes", "stream_id"),
|
||||||
|
("device_lists_changes_in_room", "stream_id"),
|
||||||
|
("device_lists_remote_pending", "stream_id"),
|
||||||
|
("device_lists_changes_converted_stream_position", "stream_id"),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
await self._setup_sequence(
|
||||||
|
"e2e_cross_signing_keys_sequence",
|
||||||
|
[
|
||||||
|
("e2e_cross_signing_keys", "stream_id"),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
await self._setup_sequence(
|
||||||
|
"push_rules_stream_sequence",
|
||||||
|
[
|
||||||
|
("push_rules_stream", "stream_id"),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
await self._setup_sequence(
|
||||||
|
"pushers_sequence",
|
||||||
|
[
|
||||||
|
("pushers", "id"),
|
||||||
|
("deleted_pushers", "stream_id"),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
# Step 3. Get tables.
|
# Step 3. Get tables.
|
||||||
@@ -1037,10 +1093,10 @@ class Porter:
|
|||||||
return done, remaining + done
|
return done, remaining + done
|
||||||
|
|
||||||
async def _setup_state_group_id_seq(self) -> None:
|
async def _setup_state_group_id_seq(self) -> None:
|
||||||
curr_id: Optional[int] = (
|
curr_id: Optional[
|
||||||
await self.sqlite_store.db_pool.simple_select_one_onecol(
|
int
|
||||||
table="state_groups", keyvalues={}, retcol="MAX(id)", allow_none=True
|
] = await self.sqlite_store.db_pool.simple_select_one_onecol(
|
||||||
)
|
table="state_groups", keyvalues={}, retcol="MAX(id)", allow_none=True
|
||||||
)
|
)
|
||||||
|
|
||||||
if not curr_id:
|
if not curr_id:
|
||||||
@@ -1101,12 +1157,11 @@ class Porter:
|
|||||||
async def _setup_sequence(
|
async def _setup_sequence(
|
||||||
self,
|
self,
|
||||||
sequence_name: str,
|
sequence_name: str,
|
||||||
stream_id_tables: Iterable[str],
|
stream_id_tables: Iterable[Tuple[str, str]],
|
||||||
column_name: str = "stream_id",
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Set a sequence to the correct value."""
|
"""Set a sequence to the correct value."""
|
||||||
current_stream_ids = []
|
current_stream_ids = []
|
||||||
for stream_id_table in stream_id_tables:
|
for stream_id_table, column_name in stream_id_tables:
|
||||||
max_stream_id = cast(
|
max_stream_id = cast(
|
||||||
int,
|
int,
|
||||||
await self.sqlite_store.db_pool.simple_select_one_onecol(
|
await self.sqlite_store.db_pool.simple_select_one_onecol(
|
||||||
@@ -1129,13 +1184,13 @@ class Porter:
|
|||||||
)
|
)
|
||||||
|
|
||||||
async def _setup_auth_chain_sequence(self) -> None:
|
async def _setup_auth_chain_sequence(self) -> None:
|
||||||
curr_chain_id: Optional[int] = (
|
curr_chain_id: Optional[
|
||||||
await self.sqlite_store.db_pool.simple_select_one_onecol(
|
int
|
||||||
table="event_auth_chains",
|
] = await self.sqlite_store.db_pool.simple_select_one_onecol(
|
||||||
keyvalues={},
|
table="event_auth_chains",
|
||||||
retcol="MAX(chain_id)",
|
keyvalues={},
|
||||||
allow_none=True,
|
retcol="MAX(chain_id)",
|
||||||
)
|
allow_none=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
def r(txn: LoggingTransaction) -> None:
|
def r(txn: LoggingTransaction) -> None:
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ logger = logging.getLogger("update_database")
|
|||||||
|
|
||||||
|
|
||||||
class MockHomeserver(HomeServer):
|
class MockHomeserver(HomeServer):
|
||||||
DATASTORE_CLASS = DataStore # type: ignore [assignment]
|
DATASTORE_CLASS = DataStore
|
||||||
|
|
||||||
def __init__(self, config: HomeServerConfig):
|
def __init__(self, config: HomeServerConfig):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
# [This file includes modifications made by New Vector Limited]
|
# [This file includes modifications made by New Vector Limited]
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
from typing import Optional, Tuple
|
from typing import TYPE_CHECKING, Optional, Tuple
|
||||||
|
|
||||||
from typing_extensions import Protocol
|
from typing_extensions import Protocol
|
||||||
|
|
||||||
@@ -28,6 +28,9 @@ from synapse.appservice import ApplicationService
|
|||||||
from synapse.http.site import SynapseRequest
|
from synapse.http.site import SynapseRequest
|
||||||
from synapse.types import Requester
|
from synapse.types import Requester
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from synapse.rest.admin.experimental_features import ExperimentalFeature
|
||||||
|
|
||||||
# guests always get this device id.
|
# guests always get this device id.
|
||||||
GUEST_DEVICE_ID = "guest_device"
|
GUEST_DEVICE_ID = "guest_device"
|
||||||
|
|
||||||
@@ -87,6 +90,19 @@ class Auth(Protocol):
|
|||||||
AuthError if access is denied for the user in the access token
|
AuthError if access is denied for the user in the access token
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
async def get_user_by_req_experimental_feature(
|
||||||
|
self,
|
||||||
|
request: SynapseRequest,
|
||||||
|
feature: "ExperimentalFeature",
|
||||||
|
allow_guest: bool = False,
|
||||||
|
allow_expired: bool = False,
|
||||||
|
allow_locked: bool = False,
|
||||||
|
) -> Requester:
|
||||||
|
"""Like `get_user_by_req`, except also checks if the user has access to
|
||||||
|
the experimental feature. If they don't returns a 404 unrecognized
|
||||||
|
request.
|
||||||
|
"""
|
||||||
|
|
||||||
async def validate_appservice_can_control_user_id(
|
async def validate_appservice_can_control_user_id(
|
||||||
self, app_service: ApplicationService, user_id: str
|
self, app_service: ApplicationService, user_id: str
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ from synapse.api.errors import (
|
|||||||
Codes,
|
Codes,
|
||||||
InvalidClientTokenError,
|
InvalidClientTokenError,
|
||||||
MissingClientTokenError,
|
MissingClientTokenError,
|
||||||
|
UnrecognizedRequestError,
|
||||||
)
|
)
|
||||||
from synapse.http.site import SynapseRequest
|
from synapse.http.site import SynapseRequest
|
||||||
from synapse.logging.opentracing import active_span, force_tracing, start_active_span
|
from synapse.logging.opentracing import active_span, force_tracing, start_active_span
|
||||||
@@ -38,8 +39,10 @@ from . import GUEST_DEVICE_ID
|
|||||||
from .base import BaseAuth
|
from .base import BaseAuth
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
|
from synapse.rest.admin.experimental_features import ExperimentalFeature
|
||||||
from synapse.server import HomeServer
|
from synapse.server import HomeServer
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@@ -106,6 +109,32 @@ class InternalAuth(BaseAuth):
|
|||||||
parent_span.set_tag("appservice_id", requester.app_service.id)
|
parent_span.set_tag("appservice_id", requester.app_service.id)
|
||||||
return requester
|
return requester
|
||||||
|
|
||||||
|
async def get_user_by_req_experimental_feature(
|
||||||
|
self,
|
||||||
|
request: SynapseRequest,
|
||||||
|
feature: "ExperimentalFeature",
|
||||||
|
allow_guest: bool = False,
|
||||||
|
allow_expired: bool = False,
|
||||||
|
allow_locked: bool = False,
|
||||||
|
) -> Requester:
|
||||||
|
try:
|
||||||
|
requester = await self.get_user_by_req(
|
||||||
|
request,
|
||||||
|
allow_guest=allow_guest,
|
||||||
|
allow_expired=allow_expired,
|
||||||
|
allow_locked=allow_locked,
|
||||||
|
)
|
||||||
|
if await self.store.is_feature_enabled(requester.user.to_string(), feature):
|
||||||
|
return requester
|
||||||
|
|
||||||
|
raise UnrecognizedRequestError(code=404)
|
||||||
|
except (AuthError, InvalidClientTokenError):
|
||||||
|
if feature.is_globally_enabled(self.hs.config):
|
||||||
|
# If its globally enabled then return the auth error
|
||||||
|
raise
|
||||||
|
|
||||||
|
raise UnrecognizedRequestError(code=404)
|
||||||
|
|
||||||
@cancellable
|
@cancellable
|
||||||
async def _wrapped_get_user_by_req(
|
async def _wrapped_get_user_by_req(
|
||||||
self,
|
self,
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ from synapse.api.errors import (
|
|||||||
OAuthInsufficientScopeError,
|
OAuthInsufficientScopeError,
|
||||||
StoreError,
|
StoreError,
|
||||||
SynapseError,
|
SynapseError,
|
||||||
|
UnrecognizedRequestError,
|
||||||
)
|
)
|
||||||
from synapse.http.site import SynapseRequest
|
from synapse.http.site import SynapseRequest
|
||||||
from synapse.logging.context import make_deferred_yieldable
|
from synapse.logging.context import make_deferred_yieldable
|
||||||
@@ -48,6 +49,7 @@ from synapse.util import json_decoder
|
|||||||
from synapse.util.caches.cached_call import RetryOnExceptionCachedCall
|
from synapse.util.caches.cached_call import RetryOnExceptionCachedCall
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
|
from synapse.rest.admin.experimental_features import ExperimentalFeature
|
||||||
from synapse.server import HomeServer
|
from synapse.server import HomeServer
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@@ -119,7 +121,9 @@ class MSC3861DelegatedAuth(BaseAuth):
|
|||||||
self._hostname = hs.hostname
|
self._hostname = hs.hostname
|
||||||
self._admin_token = self._config.admin_token
|
self._admin_token = self._config.admin_token
|
||||||
|
|
||||||
self._issuer_metadata = RetryOnExceptionCachedCall(self._load_metadata)
|
self._issuer_metadata = RetryOnExceptionCachedCall[OpenIDProviderMetadata](
|
||||||
|
self._load_metadata
|
||||||
|
)
|
||||||
|
|
||||||
if isinstance(auth_method, PrivateKeyJWTWithKid):
|
if isinstance(auth_method, PrivateKeyJWTWithKid):
|
||||||
# Use the JWK as the client secret when using the private_key_jwt method
|
# Use the JWK as the client secret when using the private_key_jwt method
|
||||||
@@ -143,6 +147,45 @@ class MSC3861DelegatedAuth(BaseAuth):
|
|||||||
# metadata.validate_introspection_endpoint()
|
# metadata.validate_introspection_endpoint()
|
||||||
return metadata
|
return metadata
|
||||||
|
|
||||||
|
async def issuer(self) -> str:
|
||||||
|
"""
|
||||||
|
Get the configured issuer
|
||||||
|
|
||||||
|
This will use the issuer value set in the metadata,
|
||||||
|
falling back to the one set in the config if not set in the metadata
|
||||||
|
"""
|
||||||
|
metadata = await self._issuer_metadata.get()
|
||||||
|
return metadata.issuer or self._config.issuer
|
||||||
|
|
||||||
|
async def account_management_url(self) -> Optional[str]:
|
||||||
|
"""
|
||||||
|
Get the configured account management URL
|
||||||
|
|
||||||
|
This will discover the account management URL from the issuer if it's not set in the config
|
||||||
|
"""
|
||||||
|
if self._config.account_management_url is not None:
|
||||||
|
return self._config.account_management_url
|
||||||
|
|
||||||
|
try:
|
||||||
|
metadata = await self._issuer_metadata.get()
|
||||||
|
return metadata.get("account_management_uri", None)
|
||||||
|
# We don't want to raise here if we can't load the metadata
|
||||||
|
except Exception:
|
||||||
|
logger.warning("Failed to load metadata:", exc_info=True)
|
||||||
|
return None
|
||||||
|
|
||||||
|
async def _introspection_endpoint(self) -> str:
|
||||||
|
"""
|
||||||
|
Returns the introspection endpoint of the issuer
|
||||||
|
|
||||||
|
It uses the config option if set, otherwise it will use OIDC discovery to get it
|
||||||
|
"""
|
||||||
|
if self._config.introspection_endpoint is not None:
|
||||||
|
return self._config.introspection_endpoint
|
||||||
|
|
||||||
|
metadata = await self._issuer_metadata.get()
|
||||||
|
return metadata.get("introspection_endpoint")
|
||||||
|
|
||||||
async def _introspect_token(self, token: str) -> IntrospectionToken:
|
async def _introspect_token(self, token: str) -> IntrospectionToken:
|
||||||
"""
|
"""
|
||||||
Send a token to the introspection endpoint and returns the introspection response
|
Send a token to the introspection endpoint and returns the introspection response
|
||||||
@@ -159,8 +202,7 @@ class MSC3861DelegatedAuth(BaseAuth):
|
|||||||
Returns:
|
Returns:
|
||||||
The introspection response
|
The introspection response
|
||||||
"""
|
"""
|
||||||
metadata = await self._issuer_metadata.get()
|
introspection_endpoint = await self._introspection_endpoint()
|
||||||
introspection_endpoint = metadata.get("introspection_endpoint")
|
|
||||||
raw_headers: Dict[str, str] = {
|
raw_headers: Dict[str, str] = {
|
||||||
"Content-Type": "application/x-www-form-urlencoded",
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
"User-Agent": str(self._http_client.user_agent, "utf-8"),
|
"User-Agent": str(self._http_client.user_agent, "utf-8"),
|
||||||
@@ -245,6 +287,32 @@ class MSC3861DelegatedAuth(BaseAuth):
|
|||||||
|
|
||||||
return requester
|
return requester
|
||||||
|
|
||||||
|
async def get_user_by_req_experimental_feature(
|
||||||
|
self,
|
||||||
|
request: SynapseRequest,
|
||||||
|
feature: "ExperimentalFeature",
|
||||||
|
allow_guest: bool = False,
|
||||||
|
allow_expired: bool = False,
|
||||||
|
allow_locked: bool = False,
|
||||||
|
) -> Requester:
|
||||||
|
try:
|
||||||
|
requester = await self.get_user_by_req(
|
||||||
|
request,
|
||||||
|
allow_guest=allow_guest,
|
||||||
|
allow_expired=allow_expired,
|
||||||
|
allow_locked=allow_locked,
|
||||||
|
)
|
||||||
|
if await self.store.is_feature_enabled(requester.user.to_string(), feature):
|
||||||
|
return requester
|
||||||
|
|
||||||
|
raise UnrecognizedRequestError(code=404)
|
||||||
|
except (AuthError, InvalidClientTokenError):
|
||||||
|
if feature.is_globally_enabled(self.hs.config):
|
||||||
|
# If its globally enabled then return the auth error
|
||||||
|
raise
|
||||||
|
|
||||||
|
raise UnrecognizedRequestError(code=404)
|
||||||
|
|
||||||
async def get_user_by_access_token(
|
async def get_user_by_access_token(
|
||||||
self,
|
self,
|
||||||
token: str,
|
token: str,
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class Membership:
|
|||||||
KNOCK: Final = "knock"
|
KNOCK: Final = "knock"
|
||||||
LEAVE: Final = "leave"
|
LEAVE: Final = "leave"
|
||||||
BAN: Final = "ban"
|
BAN: Final = "ban"
|
||||||
LIST: Final = (INVITE, JOIN, KNOCK, LEAVE, BAN)
|
LIST: Final = frozenset((INVITE, JOIN, KNOCK, LEAVE, BAN))
|
||||||
|
|
||||||
|
|
||||||
class PresenceState:
|
class PresenceState:
|
||||||
@@ -128,9 +128,13 @@ class EventTypes:
|
|||||||
SpaceParent: Final = "m.space.parent"
|
SpaceParent: Final = "m.space.parent"
|
||||||
|
|
||||||
Reaction: Final = "m.reaction"
|
Reaction: Final = "m.reaction"
|
||||||
|
Sticker: Final = "m.sticker"
|
||||||
|
LiveLocationShareStart: Final = "m.beacon_info"
|
||||||
|
|
||||||
CallInvite: Final = "m.call.invite"
|
CallInvite: Final = "m.call.invite"
|
||||||
|
|
||||||
|
PollStart: Final = "m.poll.start"
|
||||||
|
|
||||||
|
|
||||||
class ToDeviceEventTypes:
|
class ToDeviceEventTypes:
|
||||||
RoomKeyRequest: Final = "m.room_key_request"
|
RoomKeyRequest: Final = "m.room_key_request"
|
||||||
@@ -221,6 +225,13 @@ class EventContentFields:
|
|||||||
# This is deprecated in MSC2175.
|
# This is deprecated in MSC2175.
|
||||||
ROOM_CREATOR: Final = "creator"
|
ROOM_CREATOR: Final = "creator"
|
||||||
|
|
||||||
|
# The version of the room for `m.room.create` events.
|
||||||
|
ROOM_VERSION: Final = "room_version"
|
||||||
|
|
||||||
|
ROOM_NAME: Final = "name"
|
||||||
|
|
||||||
|
MEMBERSHIP: Final = "membership"
|
||||||
|
|
||||||
# Used in m.room.guest_access events.
|
# Used in m.room.guest_access events.
|
||||||
GUEST_ACCESS: Final = "guest_access"
|
GUEST_ACCESS: Final = "guest_access"
|
||||||
|
|
||||||
@@ -233,12 +244,17 @@ class EventContentFields:
|
|||||||
# an unspecced field added to to-device messages to identify them uniquely-ish
|
# an unspecced field added to to-device messages to identify them uniquely-ish
|
||||||
TO_DEVICE_MSGID: Final = "org.matrix.msgid"
|
TO_DEVICE_MSGID: Final = "org.matrix.msgid"
|
||||||
|
|
||||||
|
# `m.room.encryption`` algorithm field
|
||||||
|
ENCRYPTION_ALGORITHM: Final = "algorithm"
|
||||||
|
|
||||||
|
TOMBSTONE_SUCCESSOR_ROOM: Final = "replacement_room"
|
||||||
|
|
||||||
|
|
||||||
class EventUnsignedContentFields:
|
class EventUnsignedContentFields:
|
||||||
"""Fields found inside the 'unsigned' data on events"""
|
"""Fields found inside the 'unsigned' data on events"""
|
||||||
|
|
||||||
# Requesting user's membership, per MSC4115
|
# Requesting user's membership, per MSC4115
|
||||||
MSC4115_MEMBERSHIP: Final = "io.element.msc4115.membership"
|
MEMBERSHIP: Final = "membership"
|
||||||
|
|
||||||
|
|
||||||
class RoomTypes:
|
class RoomTypes:
|
||||||
|
|||||||
@@ -128,6 +128,10 @@ class Codes(str, Enum):
|
|||||||
# MSC2677
|
# MSC2677
|
||||||
DUPLICATE_ANNOTATION = "M_DUPLICATE_ANNOTATION"
|
DUPLICATE_ANNOTATION = "M_DUPLICATE_ANNOTATION"
|
||||||
|
|
||||||
|
# MSC3575 we are telling the client they need to expire their sliding sync
|
||||||
|
# connection.
|
||||||
|
UNKNOWN_POS = "M_UNKNOWN_POS"
|
||||||
|
|
||||||
|
|
||||||
class CodeMessageException(RuntimeError):
|
class CodeMessageException(RuntimeError):
|
||||||
"""An exception with integer code, a message string attributes and optional headers.
|
"""An exception with integer code, a message string attributes and optional headers.
|
||||||
@@ -847,3 +851,17 @@ class PartialStateConflictError(SynapseError):
|
|||||||
msg=PartialStateConflictError.message(),
|
msg=PartialStateConflictError.message(),
|
||||||
errcode=Codes.UNKNOWN,
|
errcode=Codes.UNKNOWN,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class SlidingSyncUnknownPosition(SynapseError):
|
||||||
|
"""An error that Synapse can return to signal to the client to expire their
|
||||||
|
sliding sync connection (i.e. send a new request without a `?since=`
|
||||||
|
param).
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self) -> None:
|
||||||
|
super().__init__(
|
||||||
|
HTTPStatus.BAD_REQUEST,
|
||||||
|
msg="Unknown position",
|
||||||
|
errcode=Codes.UNKNOWN_POS,
|
||||||
|
)
|
||||||
|
|||||||
@@ -130,7 +130,8 @@ class Ratelimiter:
|
|||||||
Overrides the value set during instantiation if set.
|
Overrides the value set during instantiation if set.
|
||||||
burst_count: How many actions that can be performed before being limited.
|
burst_count: How many actions that can be performed before being limited.
|
||||||
Overrides the value set during instantiation if set.
|
Overrides the value set during instantiation if set.
|
||||||
update: Whether to count this check as performing the action
|
update: Whether to count this check as performing the action. If the action
|
||||||
|
cannot be performed, the user's action count is not incremented at all.
|
||||||
n_actions: The number of times the user wants to do this action. If the user
|
n_actions: The number of times the user wants to do this action. If the user
|
||||||
cannot do all of the actions, the user's action count is not incremented
|
cannot do all of the actions, the user's action count is not incremented
|
||||||
at all.
|
at all.
|
||||||
@@ -235,9 +236,8 @@ class Ratelimiter:
|
|||||||
requester: The requester that is doing the action, if any.
|
requester: The requester that is doing the action, if any.
|
||||||
key: An arbitrary key used to classify an action. Defaults to the
|
key: An arbitrary key used to classify an action. Defaults to the
|
||||||
requester's user ID.
|
requester's user ID.
|
||||||
n_actions: The number of times the user wants to do this action. If the user
|
n_actions: The number of times the user performed the action. May be negative
|
||||||
cannot do all of the actions, the user's action count is not incremented
|
to "refund" the rate limit.
|
||||||
at all.
|
|
||||||
_time_now_s: The current time. Optional, defaults to the current time according
|
_time_now_s: The current time. Optional, defaults to the current time according
|
||||||
to self.clock. Only used by tests.
|
to self.clock. Only used by tests.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
"""Contains the URL paths to prefix various aspects of the server with. """
|
"""Contains the URL paths to prefix various aspects of the server with."""
|
||||||
|
|
||||||
import hmac
|
import hmac
|
||||||
from hashlib import sha256
|
from hashlib import sha256
|
||||||
from urllib.parse import urlencode
|
from urllib.parse import urlencode
|
||||||
|
|||||||
@@ -681,17 +681,17 @@ def setup_sentry(hs: "HomeServer") -> None:
|
|||||||
)
|
)
|
||||||
|
|
||||||
# We set some default tags that give some context to this instance
|
# We set some default tags that give some context to this instance
|
||||||
with sentry_sdk.configure_scope() as scope:
|
global_scope = sentry_sdk.Scope.get_global_scope()
|
||||||
scope.set_tag("matrix_server_name", hs.config.server.server_name)
|
global_scope.set_tag("matrix_server_name", hs.config.server.server_name)
|
||||||
|
|
||||||
app = (
|
app = (
|
||||||
hs.config.worker.worker_app
|
hs.config.worker.worker_app
|
||||||
if hs.config.worker.worker_app
|
if hs.config.worker.worker_app
|
||||||
else "synapse.app.homeserver"
|
else "synapse.app.homeserver"
|
||||||
)
|
)
|
||||||
name = hs.get_instance_name()
|
name = hs.get_instance_name()
|
||||||
scope.set_tag("worker_app", app)
|
global_scope.set_tag("worker_app", app)
|
||||||
scope.set_tag("worker_name", name)
|
global_scope.set_tag("worker_name", name)
|
||||||
|
|
||||||
|
|
||||||
def setup_sdnotify(hs: "HomeServer") -> None:
|
def setup_sdnotify(hs: "HomeServer") -> None:
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ class AdminCmdStore(
|
|||||||
|
|
||||||
|
|
||||||
class AdminCmdServer(HomeServer):
|
class AdminCmdServer(HomeServer):
|
||||||
DATASTORE_CLASS = AdminCmdStore # type: ignore
|
DATASTORE_CLASS = AdminCmdStore
|
||||||
|
|
||||||
|
|
||||||
async def export_data_command(hs: HomeServer, args: argparse.Namespace) -> None:
|
async def export_data_command(hs: HomeServer, args: argparse.Namespace) -> None:
|
||||||
|
|||||||
@@ -74,6 +74,9 @@ from synapse.storage.databases.main.event_push_actions import (
|
|||||||
EventPushActionsWorkerStore,
|
EventPushActionsWorkerStore,
|
||||||
)
|
)
|
||||||
from synapse.storage.databases.main.events_worker import EventsWorkerStore
|
from synapse.storage.databases.main.events_worker import EventsWorkerStore
|
||||||
|
from synapse.storage.databases.main.experimental_features import (
|
||||||
|
ExperimentalFeaturesStore,
|
||||||
|
)
|
||||||
from synapse.storage.databases.main.filtering import FilteringWorkerStore
|
from synapse.storage.databases.main.filtering import FilteringWorkerStore
|
||||||
from synapse.storage.databases.main.keys import KeyStore
|
from synapse.storage.databases.main.keys import KeyStore
|
||||||
from synapse.storage.databases.main.lock import LockStore
|
from synapse.storage.databases.main.lock import LockStore
|
||||||
@@ -95,6 +98,7 @@ from synapse.storage.databases.main.roommember import RoomMemberWorkerStore
|
|||||||
from synapse.storage.databases.main.search import SearchStore
|
from synapse.storage.databases.main.search import SearchStore
|
||||||
from synapse.storage.databases.main.session import SessionStore
|
from synapse.storage.databases.main.session import SessionStore
|
||||||
from synapse.storage.databases.main.signatures import SignatureWorkerStore
|
from synapse.storage.databases.main.signatures import SignatureWorkerStore
|
||||||
|
from synapse.storage.databases.main.sliding_sync import SlidingSyncStore
|
||||||
from synapse.storage.databases.main.state import StateGroupWorkerStore
|
from synapse.storage.databases.main.state import StateGroupWorkerStore
|
||||||
from synapse.storage.databases.main.stats import StatsStore
|
from synapse.storage.databases.main.stats import StatsStore
|
||||||
from synapse.storage.databases.main.stream import StreamWorkerStore
|
from synapse.storage.databases.main.stream import StreamWorkerStore
|
||||||
@@ -155,6 +159,8 @@ class GenericWorkerStore(
|
|||||||
LockStore,
|
LockStore,
|
||||||
SessionStore,
|
SessionStore,
|
||||||
TaskSchedulerWorkerStore,
|
TaskSchedulerWorkerStore,
|
||||||
|
ExperimentalFeaturesStore,
|
||||||
|
SlidingSyncStore,
|
||||||
):
|
):
|
||||||
# Properties that multiple storage classes define. Tell mypy what the
|
# Properties that multiple storage classes define. Tell mypy what the
|
||||||
# expected type is.
|
# expected type is.
|
||||||
@@ -163,7 +169,7 @@ class GenericWorkerStore(
|
|||||||
|
|
||||||
|
|
||||||
class GenericWorkerServer(HomeServer):
|
class GenericWorkerServer(HomeServer):
|
||||||
DATASTORE_CLASS = GenericWorkerStore # type: ignore
|
DATASTORE_CLASS = GenericWorkerStore
|
||||||
|
|
||||||
def _listen_http(self, listener_config: ListenerConfig) -> None:
|
def _listen_http(self, listener_config: ListenerConfig) -> None:
|
||||||
assert listener_config.http_options is not None
|
assert listener_config.http_options is not None
|
||||||
@@ -202,6 +208,21 @@ class GenericWorkerServer(HomeServer):
|
|||||||
"/_synapse/admin": admin_resource,
|
"/_synapse/admin": admin_resource,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if "federation" not in res.names:
|
||||||
|
# Only load the federation media resource separately if federation
|
||||||
|
# resource is not specified since federation resource includes media
|
||||||
|
# resource.
|
||||||
|
resources[FEDERATION_PREFIX] = TransportLayerServer(
|
||||||
|
self, servlet_groups=["media"]
|
||||||
|
)
|
||||||
|
if "client" not in res.names:
|
||||||
|
# Only load the client media resource separately if client
|
||||||
|
# resource is not specified since client resource includes media
|
||||||
|
# resource.
|
||||||
|
resources[CLIENT_API_PREFIX] = ClientRestResource(
|
||||||
|
self, servlet_groups=["media"]
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"A 'media' listener is configured but the media"
|
"A 'media' listener is configured but the media"
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ def gz_wrap(r: Resource) -> Resource:
|
|||||||
|
|
||||||
|
|
||||||
class SynapseHomeServer(HomeServer):
|
class SynapseHomeServer(HomeServer):
|
||||||
DATASTORE_CLASS = DataStore # type: ignore
|
DATASTORE_CLASS = DataStore
|
||||||
|
|
||||||
def _listener_http(
|
def _listener_http(
|
||||||
self,
|
self,
|
||||||
@@ -101,6 +101,12 @@ class SynapseHomeServer(HomeServer):
|
|||||||
# Skip loading openid resource if federation is defined
|
# Skip loading openid resource if federation is defined
|
||||||
# since federation resource will include openid
|
# since federation resource will include openid
|
||||||
continue
|
continue
|
||||||
|
if name == "media" and (
|
||||||
|
"federation" in res.names or "client" in res.names
|
||||||
|
):
|
||||||
|
# Skip loading media resource if federation or client are defined
|
||||||
|
# since federation & client resources will include media
|
||||||
|
continue
|
||||||
if name == "health":
|
if name == "health":
|
||||||
# Skip loading, health resource is always included
|
# Skip loading, health resource is always included
|
||||||
continue
|
continue
|
||||||
@@ -217,7 +223,7 @@ class SynapseHomeServer(HomeServer):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if name in ["media", "federation", "client"]:
|
if name in ["media", "federation", "client"]:
|
||||||
if self.config.server.enable_media_repo:
|
if self.config.media.can_load_media_repo:
|
||||||
media_repo = self.get_media_repository_resource()
|
media_repo = self.get_media_repository_resource()
|
||||||
resources.update(
|
resources.update(
|
||||||
{
|
{
|
||||||
@@ -231,6 +237,14 @@ class SynapseHomeServer(HomeServer):
|
|||||||
"'media' resource conflicts with enable_media_repo=False"
|
"'media' resource conflicts with enable_media_repo=False"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if name == "media":
|
||||||
|
resources[FEDERATION_PREFIX] = TransportLayerServer(
|
||||||
|
self, servlet_groups=["media"]
|
||||||
|
)
|
||||||
|
resources[CLIENT_API_PREFIX] = ClientRestResource(
|
||||||
|
self, servlet_groups=["media"]
|
||||||
|
)
|
||||||
|
|
||||||
if name in ["keys", "federation"]:
|
if name in ["keys", "federation"]:
|
||||||
resources[SERVER_KEY_PREFIX] = KeyResource(self)
|
resources[SERVER_KEY_PREFIX] = KeyResource(self)
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ UP & quit +---------- YES SUCCESS
|
|||||||
This is all tied together by the AppServiceScheduler which DIs the required
|
This is all tied together by the AppServiceScheduler which DIs the required
|
||||||
components.
|
components.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import (
|
from typing import (
|
||||||
TYPE_CHECKING,
|
TYPE_CHECKING,
|
||||||
|
|||||||
@@ -140,6 +140,12 @@ class MSC3861:
|
|||||||
("experimental", "msc3861", "client_auth_method"),
|
("experimental", "msc3861", "client_auth_method"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
introspection_endpoint: Optional[str] = attr.ib(
|
||||||
|
default=None,
|
||||||
|
validator=attr.validators.optional(attr.validators.instance_of(str)),
|
||||||
|
)
|
||||||
|
"""The URL of the introspection endpoint used to validate access tokens."""
|
||||||
|
|
||||||
account_management_url: Optional[str] = attr.ib(
|
account_management_url: Optional[str] = attr.ib(
|
||||||
default=None,
|
default=None,
|
||||||
validator=attr.validators.optional(attr.validators.instance_of(str)),
|
validator=attr.validators.optional(attr.validators.instance_of(str)),
|
||||||
@@ -332,6 +338,11 @@ class ExperimentalConfig(Config):
|
|||||||
# MSC3391: Removing account data.
|
# MSC3391: Removing account data.
|
||||||
self.msc3391_enabled = experimental.get("msc3391_enabled", False)
|
self.msc3391_enabled = experimental.get("msc3391_enabled", False)
|
||||||
|
|
||||||
|
# MSC3575 (Sliding Sync) alternate endpoints, c.f. MSC4186.
|
||||||
|
#
|
||||||
|
# This is enabled by default as a replacement for the sliding sync proxy.
|
||||||
|
self.msc3575_enabled: bool = experimental.get("msc3575_enabled", True)
|
||||||
|
|
||||||
# MSC3773: Thread notifications
|
# MSC3773: Thread notifications
|
||||||
self.msc3773_enabled: bool = experimental.get("msc3773_enabled", False)
|
self.msc3773_enabled: bool = experimental.get("msc3773_enabled", False)
|
||||||
|
|
||||||
@@ -390,9 +401,6 @@ class ExperimentalConfig(Config):
|
|||||||
# MSC3391: Removing account data.
|
# MSC3391: Removing account data.
|
||||||
self.msc3391_enabled = experimental.get("msc3391_enabled", False)
|
self.msc3391_enabled = experimental.get("msc3391_enabled", False)
|
||||||
|
|
||||||
# MSC3967: Do not require UIA when first uploading cross signing keys
|
|
||||||
self.msc3967_enabled = experimental.get("msc3967_enabled", False)
|
|
||||||
|
|
||||||
# MSC3861: Matrix architecture change to delegate authentication via OIDC
|
# MSC3861: Matrix architecture change to delegate authentication via OIDC
|
||||||
try:
|
try:
|
||||||
self.msc3861 = MSC3861(**experimental.get("msc3861", {}))
|
self.msc3861 = MSC3861(**experimental.get("msc3861", {}))
|
||||||
@@ -433,6 +441,12 @@ class ExperimentalConfig(Config):
|
|||||||
("experimental", "msc4108_delegation_endpoint"),
|
("experimental", "msc4108_delegation_endpoint"),
|
||||||
)
|
)
|
||||||
|
|
||||||
self.msc4115_membership_on_events = experimental.get(
|
self.msc3823_account_suspension = experimental.get(
|
||||||
"msc4115_membership_on_events", False
|
"msc3823_account_suspension", False
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# MSC4151: Report room API (Client-Server API)
|
||||||
|
self.msc4151_enabled: bool = experimental.get("msc4151_enabled", False)
|
||||||
|
|
||||||
|
# MSC4156: Migrate server_name to via
|
||||||
|
self.msc4156_enabled: bool = experimental.get("msc4156_enabled", False)
|
||||||
|
|||||||
@@ -200,16 +200,13 @@ class KeyConfig(Config):
|
|||||||
)
|
)
|
||||||
form_secret = 'form_secret: "%s"' % random_string_with_symbols(50)
|
form_secret = 'form_secret: "%s"' % random_string_with_symbols(50)
|
||||||
|
|
||||||
return (
|
return """\
|
||||||
"""\
|
|
||||||
%(macaroon_secret_key)s
|
%(macaroon_secret_key)s
|
||||||
%(form_secret)s
|
%(form_secret)s
|
||||||
signing_key_path: "%(base_key_name)s.signing.key"
|
signing_key_path: "%(base_key_name)s.signing.key"
|
||||||
trusted_key_servers:
|
trusted_key_servers:
|
||||||
- server_name: "matrix.org"
|
- server_name: "matrix.org"
|
||||||
"""
|
""" % locals()
|
||||||
% locals()
|
|
||||||
)
|
|
||||||
|
|
||||||
def read_signing_keys(self, signing_key_path: str, name: str) -> List[SigningKey]:
|
def read_signing_keys(self, signing_key_path: str, name: str) -> List[SigningKey]:
|
||||||
"""Read the signing keys in the given path.
|
"""Read the signing keys in the given path.
|
||||||
@@ -249,7 +246,9 @@ class KeyConfig(Config):
|
|||||||
if is_signing_algorithm_supported(key_id):
|
if is_signing_algorithm_supported(key_id):
|
||||||
key_base64 = key_data["key"]
|
key_base64 = key_data["key"]
|
||||||
key_bytes = decode_base64(key_base64)
|
key_bytes = decode_base64(key_base64)
|
||||||
verify_key: "VerifyKeyWithExpiry" = decode_verify_key_bytes(key_id, key_bytes) # type: ignore[assignment]
|
verify_key: "VerifyKeyWithExpiry" = decode_verify_key_bytes(
|
||||||
|
key_id, key_bytes
|
||||||
|
) # type: ignore[assignment]
|
||||||
verify_key.expired = key_data["expired_ts"]
|
verify_key.expired = key_data["expired_ts"]
|
||||||
keys[key_id] = verify_key
|
keys[key_id] = verify_key
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -157,12 +157,9 @@ class LoggingConfig(Config):
|
|||||||
self, config_dir_path: str, server_name: str, **kwargs: Any
|
self, config_dir_path: str, server_name: str, **kwargs: Any
|
||||||
) -> str:
|
) -> str:
|
||||||
log_config = os.path.join(config_dir_path, server_name + ".log.config")
|
log_config = os.path.join(config_dir_path, server_name + ".log.config")
|
||||||
return (
|
return """\
|
||||||
"""\
|
|
||||||
log_config: "%(log_config)s"
|
log_config: "%(log_config)s"
|
||||||
"""
|
""" % locals()
|
||||||
% locals()
|
|
||||||
)
|
|
||||||
|
|
||||||
def read_arguments(self, args: argparse.Namespace) -> None:
|
def read_arguments(self, args: argparse.Namespace) -> None:
|
||||||
if args.no_redirect_stdio is not None:
|
if args.no_redirect_stdio is not None:
|
||||||
|
|||||||
@@ -218,3 +218,13 @@ class RatelimitConfig(Config):
|
|||||||
"rc_media_create",
|
"rc_media_create",
|
||||||
defaults={"per_second": 10, "burst_count": 50},
|
defaults={"per_second": 10, "burst_count": 50},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.remote_media_downloads = RatelimitSettings(
|
||||||
|
key="rc_remote_media_downloads",
|
||||||
|
per_second=self.parse_size(
|
||||||
|
config.get("remote_media_download_per_second", "87K")
|
||||||
|
),
|
||||||
|
burst_count=self.parse_size(
|
||||||
|
config.get("remote_media_download_burst_count", "500M")
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ class ContentRepositoryConfig(Config):
|
|||||||
# Only enable the media repo if either the media repo is enabled or the
|
# Only enable the media repo if either the media repo is enabled or the
|
||||||
# current worker app is the media repo.
|
# current worker app is the media repo.
|
||||||
if (
|
if (
|
||||||
self.root.server.enable_media_repo is False
|
config.get("enable_media_repo", True) is False
|
||||||
and config.get("worker_app") != "synapse.app.media_repository"
|
and config.get("worker_app") != "synapse.app.media_repository"
|
||||||
):
|
):
|
||||||
self.can_load_media_repo = False
|
self.can_load_media_repo = False
|
||||||
@@ -272,6 +272,10 @@ class ContentRepositoryConfig(Config):
|
|||||||
remote_media_lifetime
|
remote_media_lifetime
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.enable_authenticated_media = config.get(
|
||||||
|
"enable_authenticated_media", False
|
||||||
|
)
|
||||||
|
|
||||||
def generate_config_section(self, data_dir_path: str, **kwargs: Any) -> str:
|
def generate_config_section(self, data_dir_path: str, **kwargs: Any) -> str:
|
||||||
assert data_dir_path is not None
|
assert data_dir_path is not None
|
||||||
media_store = os.path.join(data_dir_path, "media_store")
|
media_store = os.path.join(data_dir_path, "media_store")
|
||||||
|
|||||||
@@ -384,6 +384,11 @@ class ServerConfig(Config):
|
|||||||
# Whether to internally track presence, requires that presence is enabled,
|
# Whether to internally track presence, requires that presence is enabled,
|
||||||
self.track_presence = self.presence_enabled and presence_enabled != "untracked"
|
self.track_presence = self.presence_enabled and presence_enabled != "untracked"
|
||||||
|
|
||||||
|
# Determines if presence results for offline users are included on initial/full sync
|
||||||
|
self.presence_include_offline_users_on_sync = presence_config.get(
|
||||||
|
"include_offline_users_on_sync", False
|
||||||
|
)
|
||||||
|
|
||||||
# Custom presence router module
|
# Custom presence router module
|
||||||
# This is the legacy way of configuring it (the config should now be put in the modules section)
|
# This is the legacy way of configuring it (the config should now be put in the modules section)
|
||||||
self.presence_router_module_class = None
|
self.presence_router_module_class = None
|
||||||
@@ -395,12 +400,6 @@ class ServerConfig(Config):
|
|||||||
self.presence_router_config,
|
self.presence_router_config,
|
||||||
) = load_module(presence_router_config, ("presence", "presence_router"))
|
) = load_module(presence_router_config, ("presence", "presence_router"))
|
||||||
|
|
||||||
# whether to enable the media repository endpoints. This should be set
|
|
||||||
# to false if the media repository is running as a separate endpoint;
|
|
||||||
# doing so ensures that we will not run cache cleanup jobs on the
|
|
||||||
# master, potentially causing inconsistency.
|
|
||||||
self.enable_media_repo = config.get("enable_media_repo", True)
|
|
||||||
|
|
||||||
# Whether to require authentication to retrieve profile data (avatars,
|
# Whether to require authentication to retrieve profile data (avatars,
|
||||||
# display names) of other users through the client API.
|
# display names) of other users through the client API.
|
||||||
self.require_auth_for_profile_requests = config.get(
|
self.require_auth_for_profile_requests = config.get(
|
||||||
@@ -829,13 +828,10 @@ class ServerConfig(Config):
|
|||||||
).lstrip()
|
).lstrip()
|
||||||
|
|
||||||
if not unsecure_listeners:
|
if not unsecure_listeners:
|
||||||
unsecure_http_bindings = (
|
unsecure_http_bindings = """- port: %(unsecure_port)s
|
||||||
"""- port: %(unsecure_port)s
|
|
||||||
tls: false
|
tls: false
|
||||||
type: http
|
type: http
|
||||||
x_forwarded: true"""
|
x_forwarded: true""" % locals()
|
||||||
% locals()
|
|
||||||
)
|
|
||||||
|
|
||||||
if not open_private_ports:
|
if not open_private_ports:
|
||||||
unsecure_http_bindings += (
|
unsecure_http_bindings += (
|
||||||
@@ -854,16 +850,13 @@ class ServerConfig(Config):
|
|||||||
if not secure_listeners:
|
if not secure_listeners:
|
||||||
secure_http_bindings = ""
|
secure_http_bindings = ""
|
||||||
|
|
||||||
return (
|
return """\
|
||||||
"""\
|
|
||||||
server_name: "%(server_name)s"
|
server_name: "%(server_name)s"
|
||||||
pid_file: %(pid_file)s
|
pid_file: %(pid_file)s
|
||||||
listeners:
|
listeners:
|
||||||
%(secure_http_bindings)s
|
%(secure_http_bindings)s
|
||||||
%(unsecure_http_bindings)s
|
%(unsecure_http_bindings)s
|
||||||
"""
|
""" % locals()
|
||||||
% locals()
|
|
||||||
)
|
|
||||||
|
|
||||||
def read_arguments(self, args: argparse.Namespace) -> None:
|
def read_arguments(self, args: argparse.Namespace) -> None:
|
||||||
if args.manhole is not None:
|
if args.manhole is not None:
|
||||||
|
|||||||
@@ -328,10 +328,11 @@ class WorkerConfig(Config):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# type-ignore: the expression `Union[A, B]` is not a Type[Union[A, B]] currently
|
# type-ignore: the expression `Union[A, B]` is not a Type[Union[A, B]] currently
|
||||||
self.instance_map: Dict[
|
self.instance_map: Dict[str, InstanceLocationConfig] = (
|
||||||
str, InstanceLocationConfig
|
parse_and_validate_mapping(
|
||||||
] = parse_and_validate_mapping(
|
instance_map,
|
||||||
instance_map, InstanceLocationConfig # type: ignore[arg-type]
|
InstanceLocationConfig, # type: ignore[arg-type]
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Map from type of streams to source, c.f. WriterLocations.
|
# Map from type of streams to source, c.f. WriterLocations.
|
||||||
|
|||||||
@@ -589,7 +589,7 @@ class BaseV2KeyFetcher(KeyFetcher):
|
|||||||
% (server_name,)
|
% (server_name,)
|
||||||
)
|
)
|
||||||
|
|
||||||
for key_id, key_data in response_json["old_verify_keys"].items():
|
for key_id, key_data in response_json.get("old_verify_keys", {}).items():
|
||||||
if is_signing_algorithm_supported(key_id):
|
if is_signing_algorithm_supported(key_id):
|
||||||
key_base64 = key_data["key"]
|
key_base64 = key_data["key"]
|
||||||
key_bytes = decode_base64(key_base64)
|
key_bytes = decode_base64(key_base64)
|
||||||
|
|||||||
@@ -887,7 +887,8 @@ def _check_power_levels(
|
|||||||
raise SynapseError(400, f"{v!r} must be an integer.")
|
raise SynapseError(400, f"{v!r} must be an integer.")
|
||||||
if k in {"events", "notifications", "users"}:
|
if k in {"events", "notifications", "users"}:
|
||||||
if not isinstance(v, collections.abc.Mapping) or not all(
|
if not isinstance(v, collections.abc.Mapping) or not all(
|
||||||
type(v) is int for v in v.values() # noqa: E721
|
type(v) is int
|
||||||
|
for v in v.values() # noqa: E721
|
||||||
):
|
):
|
||||||
raise SynapseError(
|
raise SynapseError(
|
||||||
400,
|
400,
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user