mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-25 18:07:32 +00:00
Compare commits
23
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e95c0bd53f | ||
|
|
52d1ed24a9 | ||
|
|
4c1638e495 | ||
|
|
3f69cf8ed7 | ||
|
|
560a615c29 | ||
|
|
2e19310a87 | ||
|
|
81c5c6b2bc | ||
|
|
73d8462ace | ||
|
|
8b5fda1fb5 | ||
|
|
6f9b4a989e | ||
|
|
fe0d83d447 | ||
|
|
37dccdbeb0 | ||
|
|
1060adc670 | ||
|
|
d963b89a07 | ||
|
|
680c972b44 | ||
|
|
88b59eb053 | ||
|
|
4a99de0d28 | ||
|
|
0e1f0683c6 | ||
|
|
cec4abc7cd | ||
|
|
e6cae5b8ed | ||
|
|
02ccf64d2e | ||
|
|
4d4d875231 | ||
|
|
cdf05b9a8b |
No files matched your search
@@ -71,7 +71,7 @@ runs:
|
|||||||
|
|
||||||
- name: Install timelord-cli and git-warp-time
|
- name: Install timelord-cli and git-warp-time
|
||||||
if: steps.check-binaries.outputs.need-install == 'true'
|
if: steps.check-binaries.outputs.need-install == 'true'
|
||||||
uses: https://github.com/taiki-e/install-action@787505cde8a44ea468a00478fe52baf23b15bccd # v2
|
uses: https://github.com/taiki-e/install-action@b5fddbb5361bce8a06fb168c9d403a6cc552b084 # v2
|
||||||
with:
|
with:
|
||||||
tool: git-warp-time,timelord-cli@3.0.1
|
tool: git-warp-time,timelord-cli@3.0.1
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ repos:
|
|||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
|
|
||||||
- repo: https://github.com/crate-ci/typos
|
- repo: https://github.com/crate-ci/typos
|
||||||
rev: v1.45.2
|
rev: v1.46.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: typos
|
- id: typos
|
||||||
- id: typos
|
- id: typos
|
||||||
|
|||||||
Generated
+229
-363
File diff suppressed because it is too large.
Load diff
+10
-12
@@ -39,7 +39,10 @@ features = ["ffi", "std", "union"]
|
|||||||
version = "1.1.0"
|
version = "1.1.0"
|
||||||
|
|
||||||
[workspace.dependencies.ctor]
|
[workspace.dependencies.ctor]
|
||||||
version = "0.10.0"
|
version = "0.13.0"
|
||||||
|
|
||||||
|
[workspace.dependencies.dtor]
|
||||||
|
version = "0.13.0"
|
||||||
|
|
||||||
[workspace.dependencies.cargo_toml]
|
[workspace.dependencies.cargo_toml]
|
||||||
version = "0.22"
|
version = "0.22"
|
||||||
@@ -161,7 +164,7 @@ features = ["raw_value"]
|
|||||||
|
|
||||||
# Used for appservice registration files
|
# Used for appservice registration files
|
||||||
[workspace.dependencies.serde-saphyr]
|
[workspace.dependencies.serde-saphyr]
|
||||||
version = "0.0.24"
|
version = "0.0.25"
|
||||||
|
|
||||||
# Used to load forbidden room/user regex from config
|
# Used to load forbidden room/user regex from config
|
||||||
[workspace.dependencies.serde_regex]
|
[workspace.dependencies.serde_regex]
|
||||||
@@ -349,7 +352,7 @@ version = "1.1.1"
|
|||||||
[workspace.dependencies.ruma]
|
[workspace.dependencies.ruma]
|
||||||
# version = "0.14.1"
|
# version = "0.14.1"
|
||||||
git = "https://github.com/ruma/ruma.git"
|
git = "https://github.com/ruma/ruma.git"
|
||||||
rev = "8b522a87b541be0802fb3c7820747a6869d37318"
|
rev = "5742fec0021b85fedbf5cd1f59c50a00bb5b9f7c"
|
||||||
features = [
|
features = [
|
||||||
"appservice-api-c",
|
"appservice-api-c",
|
||||||
"client-api",
|
"client-api",
|
||||||
@@ -430,7 +433,7 @@ features = ["http", "grpc-tonic", "trace", "logs", "metrics"]
|
|||||||
|
|
||||||
# optional sentry metrics for crash/panic reporting
|
# optional sentry metrics for crash/panic reporting
|
||||||
[workspace.dependencies.sentry]
|
[workspace.dependencies.sentry]
|
||||||
version = "0.47.0"
|
version = "0.48.0"
|
||||||
default-features = false
|
default-features = false
|
||||||
features = [
|
features = [
|
||||||
"backtrace",
|
"backtrace",
|
||||||
@@ -445,9 +448,9 @@ features = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[workspace.dependencies.sentry-tracing]
|
[workspace.dependencies.sentry-tracing]
|
||||||
version = "0.47.0"
|
version = "0.48.0"
|
||||||
[workspace.dependencies.sentry-tower]
|
[workspace.dependencies.sentry-tower]
|
||||||
version = "0.47.0"
|
version = "0.48.0"
|
||||||
|
|
||||||
# jemalloc usage
|
# jemalloc usage
|
||||||
[workspace.dependencies.tikv-jemalloc-sys]
|
[workspace.dependencies.tikv-jemalloc-sys]
|
||||||
@@ -546,16 +549,11 @@ features = ["std"]
|
|||||||
[workspace.dependencies.maplit]
|
[workspace.dependencies.maplit]
|
||||||
version = "1.0.2"
|
version = "1.0.2"
|
||||||
|
|
||||||
[workspace.dependencies.ldap3]
|
|
||||||
version = "0.12.0"
|
|
||||||
default-features = false
|
|
||||||
features = ["sync", "tls-rustls", "rustls-provider"]
|
|
||||||
|
|
||||||
[workspace.dependencies.yansi]
|
[workspace.dependencies.yansi]
|
||||||
version = "1.0.1"
|
version = "1.0.1"
|
||||||
|
|
||||||
[workspace.dependencies.askama]
|
[workspace.dependencies.askama]
|
||||||
version = "0.15.0"
|
version = "0.16.0"
|
||||||
|
|
||||||
[workspace.dependencies.lettre]
|
[workspace.dependencies.lettre]
|
||||||
version = "0.11.19"
|
version = "0.11.19"
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
The invite recipient's membership event is now included in invite stripped state, which should fix flaky invite display in some clients. Contributed by @ginger
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Removed support for LDAP.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Clarified in the config that `max_request_size` affects federated media as well.
|
||||||
@@ -291,6 +291,7 @@
|
|||||||
#ip_lookup_strategy = 5
|
#ip_lookup_strategy = 5
|
||||||
|
|
||||||
# Max request size for file uploads in bytes. Defaults to 20MB.
|
# Max request size for file uploads in bytes. Defaults to 20MB.
|
||||||
|
# Also limits incoming federated media.
|
||||||
#
|
#
|
||||||
#max_request_size = 20971520
|
#max_request_size = 20971520
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -50,7 +50,7 @@ EOF
|
|||||||
|
|
||||||
# Developer tool versions
|
# Developer tool versions
|
||||||
# renovate: datasource=github-releases depName=cargo-bins/cargo-binstall
|
# renovate: datasource=github-releases depName=cargo-bins/cargo-binstall
|
||||||
ENV BINSTALL_VERSION=1.18.1
|
ENV BINSTALL_VERSION=1.19.0
|
||||||
# renovate: datasource=github-releases depName=psastras/sbom-rs
|
# renovate: datasource=github-releases depName=psastras/sbom-rs
|
||||||
ENV CARGO_SBOM_VERSION=0.9.1
|
ENV CARGO_SBOM_VERSION=0.9.1
|
||||||
# renovate: datasource=crate depName=lddtree
|
# renovate: datasource=crate depName=lddtree
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ RUN --mount=type=cache,target=/etc/apk/cache apk add \
|
|||||||
|
|
||||||
# Developer tool versions
|
# Developer tool versions
|
||||||
# renovate: datasource=github-releases depName=cargo-bins/cargo-binstall
|
# renovate: datasource=github-releases depName=cargo-bins/cargo-binstall
|
||||||
ENV BINSTALL_VERSION=1.18.1
|
ENV BINSTALL_VERSION=1.19.0
|
||||||
# renovate: datasource=github-releases depName=psastras/sbom-rs
|
# renovate: datasource=github-releases depName=psastras/sbom-rs
|
||||||
ENV CARGO_SBOM_VERSION=0.9.1
|
ENV CARGO_SBOM_VERSION=0.9.1
|
||||||
# renovate: datasource=crate depName=lddtree
|
# renovate: datasource=crate depName=lddtree
|
||||||
|
|||||||
Generated
+15
-15
@@ -3,11 +3,11 @@
|
|||||||
"advisory-db": {
|
"advisory-db": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775907537,
|
"lastModified": 1777645914,
|
||||||
"narHash": "sha256-vbeLNgmsx1Z6TwnlDV0dKyeBCcon3UpkV9yLr/yc6HM=",
|
"narHash": "sha256-P1T7QVQS13OvkXEuEhI91CLaQfyv6iqV9vW8IBLLDYg=",
|
||||||
"owner": "rustsec",
|
"owner": "rustsec",
|
||||||
"repo": "advisory-db",
|
"repo": "advisory-db",
|
||||||
"rev": "d99f7b9eb81731bddebf80a355f8be7b2f8b1b28",
|
"rev": "d6ba1f7070ba91f45efe372d68eb648be67d0417",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -18,11 +18,11 @@
|
|||||||
},
|
},
|
||||||
"crane": {
|
"crane": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775839657,
|
"lastModified": 1777335812,
|
||||||
"narHash": "sha256-SPm9ck7jh3Un9nwPuMGbRU04UroFmOHjLP56T10MOeM=",
|
"narHash": "sha256-bEg5xoAxAwsyfnGhkEX7RJViTIBIYPd8ISg4O1c0HFc=",
|
||||||
"owner": "ipetkov",
|
"owner": "ipetkov",
|
||||||
"repo": "crane",
|
"repo": "crane",
|
||||||
"rev": "7cf72d978629469c4bd4206b95c402514c1f6000",
|
"rev": "5e0fb2f64edff2822249f21293b8304dedaaf676",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -39,11 +39,11 @@
|
|||||||
"rust-analyzer-src": "rust-analyzer-src"
|
"rust-analyzer-src": "rust-analyzer-src"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775891769,
|
"lastModified": 1777624102,
|
||||||
"narHash": "sha256-EOfVlTKw2n8w1uhfh46GS4hEGnQ7oWrIWQfIY6utIkI=",
|
"narHash": "sha256-thSyElkje577x/kAbP72nHlfiFc1a+tCudskLPHXe9s=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "fenix",
|
"repo": "fenix",
|
||||||
"rev": "6fbc54dde15aee725bdc7aae5e478849685d5f56",
|
"rev": "4d81601e0b73f20d81d066754ad0e7d1e7f75a06",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -89,11 +89,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775710090,
|
"lastModified": 1777268161,
|
||||||
"narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=",
|
"narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "4c1018dae018162ec878d42fec712642d214fdfa",
|
"rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -132,11 +132,11 @@
|
|||||||
"rust-analyzer-src": {
|
"rust-analyzer-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775843361,
|
"lastModified": 1777583169,
|
||||||
"narHash": "sha256-j53ZgyDvmYf3Sjh1IPvvTjqa614qUfVQSzj59+MpzkY=",
|
"narHash": "sha256-dVJ4+wrRKc8oIgp3rLOFSq1obt/sCKlXy3h47qof/w0=",
|
||||||
"owner": "rust-lang",
|
"owner": "rust-lang",
|
||||||
"repo": "rust-analyzer",
|
"repo": "rust-analyzer",
|
||||||
"rev": "9eb97ea96d8400e8957ddd56702e962614296583",
|
"rev": "aa64e4828a2bbba44463c1229a81c748d3cce583",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
Generated
+111
-132
@@ -16,26 +16,24 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@emnapi/core": {
|
"node_modules/@emnapi/core": {
|
||||||
"version": "1.9.2",
|
"version": "1.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.9.2.tgz",
|
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz",
|
||||||
"integrity": "sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA==",
|
"integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emnapi/wasi-threads": "1.2.1",
|
"@emnapi/wasi-threads": "1.2.1",
|
||||||
"tslib": "^2.4.0"
|
"tslib": "^2.4.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@emnapi/runtime": {
|
"node_modules/@emnapi/runtime": {
|
||||||
"version": "1.9.2",
|
"version": "1.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.2.tgz",
|
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz",
|
||||||
"integrity": "sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw==",
|
"integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.4.0"
|
"tslib": "^2.4.0"
|
||||||
}
|
}
|
||||||
@@ -47,7 +45,6 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.4.0"
|
"tslib": "^2.4.0"
|
||||||
}
|
}
|
||||||
@@ -109,9 +106,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/wasm-runtime": {
|
"node_modules/@napi-rs/wasm-runtime": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.4.tgz",
|
||||||
"integrity": "sha512-sNXv5oLJ7ob93xkZ1XnxisYhGYXfaG9f65/ZgYuAu3qt7b3NadcOEhLvx28hv31PgX8SZJRYrAIPQilQmFpLVw==",
|
"integrity": "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
@@ -128,13 +125,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rsbuild/core": {
|
"node_modules/@rsbuild/core": {
|
||||||
"version": "2.0.0-rc.1",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.0.0-rc.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.0.3.tgz",
|
||||||
"integrity": "sha512-eqxtRlQiFSm/ibCNGiPj8ozsGSNK91NY+GksmPuTCPmWQExGtPqM1V+s13UYeWZS6fYbMRs7NlQKD896e0QkKA==",
|
"integrity": "sha512-2myp7jUgGen50saxW8OJD/eMVKp7HnuBN5MUzwRb6mDbRZZVpoorfI4LQqiGSBNjGLB6jltvx/R2yHmcmnchwg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rspack/core": "2.0.0-rc.1",
|
"@rspack/core": "~2.0.1",
|
||||||
"@swc/helpers": "^0.5.21"
|
"@swc/helpers": "^0.5.21"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -153,17 +150,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rsbuild/plugin-react": {
|
"node_modules/@rsbuild/plugin-react": {
|
||||||
"version": "1.4.6",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rsbuild/plugin-react/-/plugin-react-1.4.6.tgz",
|
"resolved": "https://registry.npmjs.org/@rsbuild/plugin-react/-/plugin-react-2.0.0.tgz",
|
||||||
"integrity": "sha512-LAT6xHlEyZKA0VjF/ph5d50iyG+WSmBx+7g98HNZUwb94VeeTMZFB8qVptTkbIRMss3BNKOXmHOu71Lhsh9oEw==",
|
"integrity": "sha512-/1gzt39EGUSFEqB83g46QoOwsgv172HI18i6au1b6lgIaX4sv9stuX4ijdHbHCp8PqYEq+MyQ99jIQMO6I+etg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rspack/plugin-react-refresh": "^1.6.1",
|
"@rspack/plugin-react-refresh": "2.0.0",
|
||||||
"react-refresh": "^0.18.0"
|
"react-refresh": "^0.18.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@rsbuild/core": "^1.0.0 || ^2.0.0-0"
|
"@rsbuild/core": "^2.0.0-0"
|
||||||
},
|
},
|
||||||
"peerDependenciesMeta": {
|
"peerDependenciesMeta": {
|
||||||
"@rsbuild/core": {
|
"@rsbuild/core": {
|
||||||
@@ -172,28 +169,28 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding": {
|
"node_modules/@rspack/binding": {
|
||||||
"version": "2.0.0-rc.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.0.0-rc.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.0.1.tgz",
|
||||||
"integrity": "sha512-rhJqtbyiRPOjTAZW0xTZFbOrS5yP5yL1SF0DPE9kvFfzePz30IqjMDMxL0KuhkDZd/M1eUINJyoqd8NTbR9wHw==",
|
"integrity": "sha512-ynV1gw4KqFtQ0P+ZZh76SUj49wBb2FuHW3zSmHverHWuxBhzvrZS6/dZ+fCFQG8bTTPtrPz0RQUTN3uEDbPVBQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@rspack/binding-darwin-arm64": "2.0.0-rc.1",
|
"@rspack/binding-darwin-arm64": "2.0.1",
|
||||||
"@rspack/binding-darwin-x64": "2.0.0-rc.1",
|
"@rspack/binding-darwin-x64": "2.0.1",
|
||||||
"@rspack/binding-linux-arm64-gnu": "2.0.0-rc.1",
|
"@rspack/binding-linux-arm64-gnu": "2.0.1",
|
||||||
"@rspack/binding-linux-arm64-musl": "2.0.0-rc.1",
|
"@rspack/binding-linux-arm64-musl": "2.0.1",
|
||||||
"@rspack/binding-linux-x64-gnu": "2.0.0-rc.1",
|
"@rspack/binding-linux-x64-gnu": "2.0.1",
|
||||||
"@rspack/binding-linux-x64-musl": "2.0.0-rc.1",
|
"@rspack/binding-linux-x64-musl": "2.0.1",
|
||||||
"@rspack/binding-wasm32-wasi": "2.0.0-rc.1",
|
"@rspack/binding-wasm32-wasi": "2.0.1",
|
||||||
"@rspack/binding-win32-arm64-msvc": "2.0.0-rc.1",
|
"@rspack/binding-win32-arm64-msvc": "2.0.1",
|
||||||
"@rspack/binding-win32-ia32-msvc": "2.0.0-rc.1",
|
"@rspack/binding-win32-ia32-msvc": "2.0.1",
|
||||||
"@rspack/binding-win32-x64-msvc": "2.0.0-rc.1"
|
"@rspack/binding-win32-x64-msvc": "2.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-darwin-arm64": {
|
"node_modules/@rspack/binding-darwin-arm64": {
|
||||||
"version": "2.0.0-rc.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-2.0.0-rc.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-2.0.1.tgz",
|
||||||
"integrity": "sha512-fYbeDDDg6QKZzXYt/J0/j0Qhr01wQLuISUsYnNhu5MLwdXVUSVcqz+CTqgF3d0EQVVn6FqLV63lbNRzUGfSq9g==",
|
"integrity": "sha512-CGFO5zmajD1Itch1lxAI7+gvKiagzyqXopHv/jHG9Su2WWQ2/Nhn2/rkSpdp6ptE9ri6+6tCOOahf099/v/Xog==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -205,9 +202,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-darwin-x64": {
|
"node_modules/@rspack/binding-darwin-x64": {
|
||||||
"version": "2.0.0-rc.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.0.0-rc.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.0.1.tgz",
|
||||||
"integrity": "sha512-MvXi9kr8xXn1y0PD1WI/4YphRNOdbykJjKdEsAG4JxEVoERmhIHOTwKvUqlejajizAwlVZcxQl/FacoPLsKN5Q==",
|
"integrity": "sha512-2vvBNBoS09/PurupBwSrlTZd8283o00B8v20ncsNUdEff41uCR/hzIrYoTIVWnVST+Gt5O1+cfcfORp397lajg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -219,9 +216,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-linux-arm64-gnu": {
|
"node_modules/@rspack/binding-linux-arm64-gnu": {
|
||||||
"version": "2.0.0-rc.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.0.0-rc.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.0.1.tgz",
|
||||||
"integrity": "sha512-j6WsHEwGSdUoiy4BsQBW0RjFl+MBzozdybSYhkiyVSoHlbm7CPt3XaaS3elH5YcwuLHORmVHPP91QhwWl9UFJg==",
|
"integrity": "sha512-uvNXk6ahE3AH3h2avnd1Mgno68YQpS4cfX1OkOGWIC/roL+NrOP2XVXV4yfVAoydPALDO7AfbIfN0QdmBK3rsA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -236,9 +233,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-linux-arm64-musl": {
|
"node_modules/@rspack/binding-linux-arm64-musl": {
|
||||||
"version": "2.0.0-rc.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.0.0-rc.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.0.1.tgz",
|
||||||
"integrity": "sha512-MPoZE0aS8oH+Wr0R5tIYch8gbUwYYf4LsiGdP6enMKMTrmpJyOVGlhPHVSwsrFgBg7fjTGOuxHuibtsvDUdLOQ==",
|
"integrity": "sha512-S/a6uN9PiZ5O/PjSqyIXhuRC1lVzeJkJV69NeLk5sIEUiDQ/aQGZG97uN+tluwpbo1tPbLJkdHYETfjspOX4Pg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -253,9 +250,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-linux-x64-gnu": {
|
"node_modules/@rspack/binding-linux-x64-gnu": {
|
||||||
"version": "2.0.0-rc.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.0.0-rc.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.0.1.tgz",
|
||||||
"integrity": "sha512-gOlPCwtIg9GsFG/8ZdUyV5SyXDaGq2kmtXmyyFU7RO33MaalltNEBMf2hevRPj9z39eSzxwgJDonMOdx5Fo0Og==",
|
"integrity": "sha512-C13Kk0OkZiocZVj187Sf753UH6pDXnuEu6vzUvi3qv9ltibG1ki0H2Y8isXBYL2cHQOV+hk0g1S6/4z3TTB97A==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -270,9 +267,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-linux-x64-musl": {
|
"node_modules/@rspack/binding-linux-x64-musl": {
|
||||||
"version": "2.0.0-rc.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.0.0-rc.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.0.1.tgz",
|
||||||
"integrity": "sha512-K6Swk1rfP4z4b6bp84NlikGlUWMOPpIWCtlPr/W0TWgc2C/cd844oHdoIu7WtmOH7y9AwB5UG2bWpgFAVwykCw==",
|
"integrity": "sha512-TQsiBFpEDGkuvK9tNdGj/Uc+AIytzqhxXH/1jKU6M24cWB1DTw/Cx7DdrkCBDyq3129K3POLdujvbWCGqBzQUw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -287,9 +284,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-wasm32-wasi": {
|
"node_modules/@rspack/binding-wasm32-wasi": {
|
||||||
"version": "2.0.0-rc.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.0.0-rc.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.0.1.tgz",
|
||||||
"integrity": "sha512-aa9oUTqOb1QjwsHVlMr5sV+7mcBI4MLQ/xhFO2CIEcfVnJIPl8XpKUbDEgqMwcFlzcgzKmHg5cVmIvd82BLgow==",
|
"integrity": "sha512-wk3gyUgBW/ayP49bI54bkY8+EQnfBHxdoe9dz3oobSTZQc8AOWwmUUDEPltW8rUvPOM6dfHECTOUMnfaf2f5yA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"wasm32"
|
"wasm32"
|
||||||
],
|
],
|
||||||
@@ -297,13 +294,15 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@napi-rs/wasm-runtime": "1.1.2"
|
"@emnapi/core": "1.10.0",
|
||||||
|
"@emnapi/runtime": "1.10.0",
|
||||||
|
"@napi-rs/wasm-runtime": "1.1.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-win32-arm64-msvc": {
|
"node_modules/@rspack/binding-win32-arm64-msvc": {
|
||||||
"version": "2.0.0-rc.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.0.0-rc.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.0.1.tgz",
|
||||||
"integrity": "sha512-+UxF0c7E9bE3siFbMHi+mmoeQJzcTKl1j3x+Y6MY/PJ3V70cU23wOaxMvmSsCyq2JNJBT2RCNZ9HaL+o3kReug==",
|
"integrity": "sha512-rHjLcy3VcAC3+x+PxH+gwhwv6tPe0JdXTNT5eAOs9wgZIM6T9p4wre49+K4Qy98+Fb7TTbLX0ObUitlOkGwTSA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -315,9 +314,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-win32-ia32-msvc": {
|
"node_modules/@rspack/binding-win32-ia32-msvc": {
|
||||||
"version": "2.0.0-rc.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.0.0-rc.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.0.1.tgz",
|
||||||
"integrity": "sha512-gc0JdkdxSWo+o/b1qTCT6mZ3DrlGe32eW+Ps3xInxcG4UHjUG7hTDgFtOgVQ6VhQ8WMUXG+TQOz0CySVpYjsoQ==",
|
"integrity": "sha512-Ad1vVqMBBnd4T8rsORngu9sl2kyRTlS4kMlvFudjzl1X2UFArEDBe0YVGNN7ZvahM12CErUx2WiN8Sd8pb+qXQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ia32"
|
"ia32"
|
||||||
],
|
],
|
||||||
@@ -329,9 +328,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/binding-win32-x64-msvc": {
|
"node_modules/@rspack/binding-win32-x64-msvc": {
|
||||||
"version": "2.0.0-rc.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.0.0-rc.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.0.1.tgz",
|
||||||
"integrity": "sha512-Dnj0jthyVUikf65MGEyZy3akshtSmR1xsp/Xr0h/NWTo5JFWHKAFNYFE+jFfY0uzC8e4IDcLQLYoFomqV1DsEg==",
|
"integrity": "sha512-oPM2Jtm7HOlmxl/aBfleAVlL6t9VeHx6WvEets7BBJMInemFXAQd4CErRqybf7rXutACzLeUWBOue4Jpd1/ykw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -343,13 +342,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/core": {
|
"node_modules/@rspack/core": {
|
||||||
"version": "2.0.0-rc.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.0.0-rc.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.0.1.tgz",
|
||||||
"integrity": "sha512-OIfkYn05/IWtVIdZ8Y/a0y/k4ipzqfApxIZqnJM59G/bGwQKMBrLHpOMGgV2Wmq1j9UMXzF7ZtsFMUbYBhFb9A==",
|
"integrity": "sha512-lgfZiExh8kDR/3obgi3RQKwKG5av1Xf5qDN1aVde777W9pbmx0Pqvrww1qtNvJ+gobEjbrrn5HEZWYGe0VLmcA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rspack/binding": "2.0.0-rc.1"
|
"@rspack/binding": "2.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.19.0 || >=22.12.0"
|
"node": "^20.19.0 || >=22.12.0"
|
||||||
@@ -368,36 +367,33 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rspack/plugin-react-refresh": {
|
"node_modules/@rspack/plugin-react-refresh": {
|
||||||
"version": "1.6.2",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rspack/plugin-react-refresh/-/plugin-react-refresh-1.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/@rspack/plugin-react-refresh/-/plugin-react-refresh-2.0.0.tgz",
|
||||||
"integrity": "sha512-k+/VrfTNgo+KirjI6V+8CWRj6y+DH9jOUWv8JorYY4vKf/9xfnZ8xHzuB4iqCwTtoZl9YnxOaOuoyjJipc2tiQ==",
|
"integrity": "sha512-Cf6CxBStNDJbiXMc/GmsvG1G8PRlUpa0MSfWsMTI+e8npzuTN/p8nwLs3shriBZOLciqgkSZpBtPTd10BLpj1g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
|
||||||
"error-stack-parser": "^2.1.4"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react-refresh": ">=0.10.0 <1.0.0",
|
"@rspack/core": "^2.0.0-0",
|
||||||
"webpack-hot-middleware": "2.x"
|
"react-refresh": ">=0.10.0 <1.0.0"
|
||||||
},
|
},
|
||||||
"peerDependenciesMeta": {
|
"peerDependenciesMeta": {
|
||||||
"webpack-hot-middleware": {
|
"@rspack/core": {
|
||||||
"optional": true
|
"optional": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rspress/core": {
|
"node_modules/@rspress/core": {
|
||||||
"version": "2.0.9",
|
"version": "2.0.10",
|
||||||
"resolved": "https://registry.npmjs.org/@rspress/core/-/core-2.0.9.tgz",
|
"resolved": "https://registry.npmjs.org/@rspress/core/-/core-2.0.10.tgz",
|
||||||
"integrity": "sha512-cfbqqbWtdimrWIsfeyPnQOTKwJpdNLr8VnwLIL4JYC2ZcRq+xcInpszLXVpV86nONL6qI19usr2Or7uzZJ+ynA==",
|
"integrity": "sha512-DvoV7YUW538x0CVAGyYPKfjUHgEuq7Z8LZq1cpfUgBpA1DynFUK3Ls6spvdoAHAl3l0AN+xxOHpu/sRVhzqi/A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mdx-js/mdx": "^3.1.1",
|
"@mdx-js/mdx": "^3.1.1",
|
||||||
"@mdx-js/react": "^3.1.1",
|
"@mdx-js/react": "^3.1.1",
|
||||||
"@rsbuild/core": "2.0.0-rc.1",
|
"@rsbuild/core": "^2.0.2",
|
||||||
"@rsbuild/plugin-react": "~1.4.6",
|
"@rsbuild/plugin-react": "~2.0.0",
|
||||||
"@rspress/shared": "2.0.9",
|
"@rspress/shared": "2.0.10",
|
||||||
"@shikijs/rehype": "^4.0.2",
|
"@shikijs/rehype": "^4.0.2",
|
||||||
"@types/unist": "^3.0.3",
|
"@types/unist": "^3.0.3",
|
||||||
"@unhead/react": "^2.1.13",
|
"@unhead/react": "^2.1.13",
|
||||||
@@ -411,8 +407,8 @@
|
|||||||
"mdast-util-mdxjs-esm": "^2.0.1",
|
"mdast-util-mdxjs-esm": "^2.0.1",
|
||||||
"medium-zoom": "1.1.0",
|
"medium-zoom": "1.1.0",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"react": "^19.2.4",
|
"react": "^19.2.5",
|
||||||
"react-dom": "^19.2.4",
|
"react-dom": "^19.2.5",
|
||||||
"react-lazy-with-preload": "^2.2.1",
|
"react-lazy-with-preload": "^2.2.1",
|
||||||
"react-reconciler": "0.33.0",
|
"react-reconciler": "0.33.0",
|
||||||
"react-render-to-markdown": "19.0.1",
|
"react-render-to-markdown": "19.0.1",
|
||||||
@@ -440,39 +436,39 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rspress/plugin-client-redirects": {
|
"node_modules/@rspress/plugin-client-redirects": {
|
||||||
"version": "2.0.9",
|
"version": "2.0.10",
|
||||||
"resolved": "https://registry.npmjs.org/@rspress/plugin-client-redirects/-/plugin-client-redirects-2.0.9.tgz",
|
"resolved": "https://registry.npmjs.org/@rspress/plugin-client-redirects/-/plugin-client-redirects-2.0.10.tgz",
|
||||||
"integrity": "sha512-r2GyHzOSt8CeS4UIsy/cPM5Zotekt1JVQFmgOYGapvll5ktUlVcd77HLtXDbZjtpgtj0XlaMLrXueOpV2gsBoQ==",
|
"integrity": "sha512-ImOm3h/cbXiJXIvpwv3Wn9rM91xgdhKbD2WX+WlMlWO4AtQfKR4XFrVhIZZAkrt09eeotRIklA7nu8Nuzzzbsw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.19.0 || >=22.12.0"
|
"node": "^20.19.0 || >=22.12.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@rspress/core": "^2.0.9"
|
"@rspress/core": "^2.0.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rspress/plugin-sitemap": {
|
"node_modules/@rspress/plugin-sitemap": {
|
||||||
"version": "2.0.9",
|
"version": "2.0.10",
|
||||||
"resolved": "https://registry.npmjs.org/@rspress/plugin-sitemap/-/plugin-sitemap-2.0.9.tgz",
|
"resolved": "https://registry.npmjs.org/@rspress/plugin-sitemap/-/plugin-sitemap-2.0.10.tgz",
|
||||||
"integrity": "sha512-GTuXuySaeaazUZoUxdk2vZ8p0ehIgulPjCP9C7gDg6lIh5JGpUbcjG4def4tWHsxUoKp2rIwu/93bHwKb8T0Mw==",
|
"integrity": "sha512-PZLig9+OlnyLcy6x9BlEqWSRef6TzDWB6Dlh2/hY41FtKlhyb7d7U56RGlLselWaQV54SHVa6H/y611A56ZI2g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.19.0 || >=22.12.0"
|
"node": "^20.19.0 || >=22.12.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@rspress/core": "^2.0.9"
|
"@rspress/core": "^2.0.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rspress/shared": {
|
"node_modules/@rspress/shared": {
|
||||||
"version": "2.0.9",
|
"version": "2.0.10",
|
||||||
"resolved": "https://registry.npmjs.org/@rspress/shared/-/shared-2.0.9.tgz",
|
"resolved": "https://registry.npmjs.org/@rspress/shared/-/shared-2.0.10.tgz",
|
||||||
"integrity": "sha512-G48n3pC7AVAR58pLqwClUCYj5Nt7ZgYEStR8VTBGFuPgXtzb3+KPfo/gz0hb6wxdKJ1cL5ohPsZ6EXqllu6lew==",
|
"integrity": "sha512-Kx10OAHWqi2jvW7ScmBUbkGjnwv4E6rEoelUchcL8It8nQ4nAVk0xvvES7m64knEon55zDbs8JQumCjbHu801Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rsbuild/core": "2.0.0-rc.1",
|
"@rsbuild/core": "^2.0.2",
|
||||||
"@shikijs/rehype": "^4.0.2",
|
"@shikijs/rehype": "^4.0.2",
|
||||||
"unified": "^11.0.5"
|
"unified": "^11.0.5"
|
||||||
}
|
}
|
||||||
@@ -972,16 +968,6 @@
|
|||||||
"url": "https://github.com/fb55/entities?sponsor=1"
|
"url": "https://github.com/fb55/entities?sponsor=1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/error-stack-parser": {
|
|
||||||
"version": "2.1.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.1.4.tgz",
|
|
||||||
"integrity": "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"stackframe": "^1.3.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/esast-util-from-estree": {
|
"node_modules/esast-util-from-estree": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/esast-util-from-estree/-/esast-util-from-estree-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/esast-util-from-estree/-/esast-util-from-estree-2.0.0.tgz",
|
||||||
@@ -1413,9 +1399,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/hookable": {
|
"node_modules/hookable": {
|
||||||
"version": "6.1.0",
|
"version": "6.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/hookable/-/hookable-6.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/hookable/-/hookable-6.1.1.tgz",
|
||||||
"integrity": "sha512-ZoKZSJgu8voGK2geJS+6YtYjvIzu9AOM/KZXsBxr83uhLL++e9pEv/dlgwgy3dvHg06kTz6JOh1hk3C8Ceiymw==",
|
"integrity": "sha512-U9LYDy1CwhMCnprUfeAZWZGByVbhd54hwepegYTK7Pi5NvqEj63ifz5z+xukznehT7i6NIZRu89Ay1AZmRsLEQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
@@ -2697,20 +2683,20 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/oniguruma-parser": {
|
"node_modules/oniguruma-parser": {
|
||||||
"version": "0.12.1",
|
"version": "0.12.2",
|
||||||
"resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.1.tgz",
|
"resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.2.tgz",
|
||||||
"integrity": "sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w==",
|
"integrity": "sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/oniguruma-to-es": {
|
"node_modules/oniguruma-to-es": {
|
||||||
"version": "4.3.5",
|
"version": "4.3.6",
|
||||||
"resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-4.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-4.3.6.tgz",
|
||||||
"integrity": "sha512-Zjygswjpsewa0NLTsiizVuMQZbp0MDyM6lIt66OxsF21npUDlzpHi1Mgb/qhQdkb+dWFTzJmFbEWdvZgRho8eQ==",
|
"integrity": "sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"oniguruma-parser": "^0.12.1",
|
"oniguruma-parser": "^0.12.2",
|
||||||
"regex": "^6.1.0",
|
"regex": "^6.1.0",
|
||||||
"regex-recursion": "^6.0.2"
|
"regex-recursion": "^6.0.2"
|
||||||
}
|
}
|
||||||
@@ -2836,9 +2822,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/react-router": {
|
"node_modules/react-router": {
|
||||||
"version": "7.14.0",
|
"version": "7.14.2",
|
||||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.14.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.14.2.tgz",
|
||||||
"integrity": "sha512-m/xR9N4LQLmAS0ZhkY2nkPA1N7gQ5TUVa5n8TgANuDTARbn1gt+zLPXEm7W0XDTbrQ2AJSJKhoa6yx1D8BcpxQ==",
|
"integrity": "sha512-yCqNne6I8IB6rVCH7XUvlBK7/QKyqypBFGv+8dj4QBFJiiRX+FG7/nkdAvGElyvVZ/HQP5N19wzteuTARXi5Gw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -2859,13 +2845,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/react-router-dom": {
|
"node_modules/react-router-dom": {
|
||||||
"version": "7.14.0",
|
"version": "7.14.2",
|
||||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.14.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.14.2.tgz",
|
||||||
"integrity": "sha512-2G3ajSVSZMEtmTjIklRWlNvo8wICEpLihfD/0YMDxbWK2UyP5EGfnoIn9AIQGnF3G/FX0MRbHXdFcD+rL1ZreQ==",
|
"integrity": "sha512-YZcM5ES8jJSM+KrJ9BdvHHqlnGTg5tH3sC5ChFRj4inosKctdyzBDhOyyHdGk597q2OT6NTrCA1OvB/YDwfekQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react-router": "7.14.0"
|
"react-router": "7.14.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20.0.0"
|
"node": ">=20.0.0"
|
||||||
@@ -3218,13 +3204,6 @@
|
|||||||
"url": "https://github.com/sponsors/wooorm"
|
"url": "https://github.com/sponsors/wooorm"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/stackframe": {
|
|
||||||
"version": "1.3.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz",
|
|
||||||
"integrity": "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/stringify-entities": {
|
"node_modules/stringify-entities": {
|
||||||
"version": "4.0.4",
|
"version": "4.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz",
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ conduwuit-macros.workspace = true
|
|||||||
conduwuit-service.workspace = true
|
conduwuit-service.workspace = true
|
||||||
const-str.workspace = true
|
const-str.workspace = true
|
||||||
ctor.workspace = true
|
ctor.workspace = true
|
||||||
|
dtor.workspace = true
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
lettre.workspace = true
|
lettre.workspace = true
|
||||||
log.workspace = true
|
log.workspace = true
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ pub(super) async fn create_user(&self, username: String, password: Option<String
|
|||||||
// Create user
|
// Create user
|
||||||
self.services
|
self.services
|
||||||
.users
|
.users
|
||||||
.create(&user_id, Some(password.as_str()), None)
|
.create(&user_id, Some(password.as_str()))
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
// Default to pretty displayname
|
// Default to pretty displayname
|
||||||
|
|||||||
+1
-3
@@ -48,9 +48,6 @@ jemalloc_stats = [
|
|||||||
"conduwuit-core/jemalloc_stats",
|
"conduwuit-core/jemalloc_stats",
|
||||||
"conduwuit-service/jemalloc_stats",
|
"conduwuit-service/jemalloc_stats",
|
||||||
]
|
]
|
||||||
ldap = [
|
|
||||||
"conduwuit-service/ldap"
|
|
||||||
]
|
|
||||||
release_max_log_level = [
|
release_max_log_level = [
|
||||||
"conduwuit-core/release_max_log_level",
|
"conduwuit-core/release_max_log_level",
|
||||||
"conduwuit-service/release_max_log_level",
|
"conduwuit-service/release_max_log_level",
|
||||||
@@ -77,6 +74,7 @@ conduwuit-macros.workspace = true
|
|||||||
conduwuit-service.workspace = true
|
conduwuit-service.workspace = true
|
||||||
const-str.workspace = true
|
const-str.workspace = true
|
||||||
ctor.workspace = true
|
ctor.workspace = true
|
||||||
|
dtor.workspace = true
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
hmac.workspace = true
|
hmac.workspace = true
|
||||||
http.workspace = true
|
http.workspace = true
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ pub(crate) async fn register_route(
|
|||||||
let password = if is_guest { None } else { body.password.as_deref() };
|
let password = if is_guest { None } else { body.password.as_deref() };
|
||||||
|
|
||||||
// Create user
|
// Create user
|
||||||
services.users.create(&user_id, password, None).await?;
|
services.users.create(&user_id, password).await?;
|
||||||
|
|
||||||
// Set an initial display name
|
// Set an initial display name
|
||||||
let mut displayname = user_id.localpart().to_owned();
|
let mut displayname = user_id.localpart().to_owned();
|
||||||
|
|||||||
@@ -163,7 +163,11 @@ pub(crate) async fn invite_helper(
|
|||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
let invite_room_state = services.rooms.state.summary_stripped(&pdu, room_id).await;
|
let invite_room_state = services
|
||||||
|
.rooms
|
||||||
|
.state
|
||||||
|
.summary_stripped(&pdu, room_id, recipient_user)
|
||||||
|
.await;
|
||||||
|
|
||||||
drop(state_lock);
|
drop(state_lock);
|
||||||
|
|
||||||
|
|||||||
@@ -24,9 +24,14 @@ pub(crate) async fn kick_user_route(
|
|||||||
if !services
|
if !services
|
||||||
.rooms
|
.rooms
|
||||||
.state_cache
|
.state_cache
|
||||||
.is_joined(&body.user_id, &body.room_id)
|
.user_membership(&body.user_id, &body.room_id)
|
||||||
.await
|
.await
|
||||||
{
|
.is_some_and(|membership| {
|
||||||
|
matches!(
|
||||||
|
membership,
|
||||||
|
MembershipState::Invite | MembershipState::Join | MembershipState::Knock
|
||||||
|
)
|
||||||
|
}) {
|
||||||
return Err!(Request(Forbidden("You cannot kick users who are not in the room.")));
|
return Err!(Request(Forbidden("You cannot kick users who are not in the room.")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use conduwuit::{
|
|||||||
utils::{self, ReadyExt, hash, stream::BroadbandExt},
|
utils::{self, ReadyExt, hash, stream::BroadbandExt},
|
||||||
warn,
|
warn,
|
||||||
};
|
};
|
||||||
use conduwuit_core::{debug_error, debug_warn};
|
use conduwuit_core::debug_error;
|
||||||
use conduwuit_service::Services;
|
use conduwuit_service::Services;
|
||||||
use futures::StreamExt;
|
use futures::StreamExt;
|
||||||
use lettre::Address;
|
use lettre::Address;
|
||||||
@@ -64,17 +64,6 @@ pub(crate) async fn password_login(
|
|||||||
lowercased_user_id: &UserId,
|
lowercased_user_id: &UserId,
|
||||||
password: &str,
|
password: &str,
|
||||||
) -> Result<OwnedUserId> {
|
) -> Result<OwnedUserId> {
|
||||||
// Restrict login to accounts only of type 'password', including untyped
|
|
||||||
// legacy accounts which are equivalent to 'password'.
|
|
||||||
if services
|
|
||||||
.users
|
|
||||||
.origin(user_id)
|
|
||||||
.await
|
|
||||||
.is_ok_and(|origin| origin != "password")
|
|
||||||
{
|
|
||||||
return Err!(Request(Forbidden("Account does not permit password login.")));
|
|
||||||
}
|
|
||||||
|
|
||||||
let (hash, user_id) = match services.users.password_hash(user_id).await {
|
let (hash, user_id) = match services.users.password_hash(user_id).await {
|
||||||
| Ok(hash) => (hash, user_id),
|
| Ok(hash) => (hash, user_id),
|
||||||
| Err(_) => services
|
| Err(_) => services
|
||||||
@@ -96,71 +85,6 @@ pub(crate) async fn password_login(
|
|||||||
Ok(user_id.to_owned())
|
Ok(user_id.to_owned())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Authenticates the given user through the configured LDAP server.
|
|
||||||
///
|
|
||||||
/// Creates the user if the user is found in the LDAP and do not already have an
|
|
||||||
/// account.
|
|
||||||
#[tracing::instrument(skip_all, fields(%user_id), name = "ldap", level = "debug")]
|
|
||||||
pub(super) async fn ldap_login(
|
|
||||||
services: &Services,
|
|
||||||
user_id: &UserId,
|
|
||||||
lowercased_user_id: &UserId,
|
|
||||||
password: &str,
|
|
||||||
) -> Result<OwnedUserId> {
|
|
||||||
let (user_dn, is_ldap_admin) = match services.config.ldap.bind_dn.as_ref() {
|
|
||||||
| Some(bind_dn) if bind_dn.contains("{username}") =>
|
|
||||||
(bind_dn.replace("{username}", lowercased_user_id.localpart()), None),
|
|
||||||
| _ => {
|
|
||||||
debug!("Searching user in LDAP");
|
|
||||||
|
|
||||||
let dns = services.users.search_ldap(user_id).await?;
|
|
||||||
if dns.len() >= 2 {
|
|
||||||
return Err!(Ldap("LDAP search returned two or more results"));
|
|
||||||
}
|
|
||||||
|
|
||||||
let Some((user_dn, is_admin)) = dns.first() else {
|
|
||||||
return password_login(services, user_id, lowercased_user_id, password).await;
|
|
||||||
};
|
|
||||||
|
|
||||||
(user_dn.clone(), *is_admin)
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
let user_id = services
|
|
||||||
.users
|
|
||||||
.auth_ldap(&user_dn, password)
|
|
||||||
.await
|
|
||||||
.map(|()| lowercased_user_id.to_owned())?;
|
|
||||||
|
|
||||||
// LDAP users are automatically created on first login attempt. This is a very
|
|
||||||
// common feature that can be seen on many services using a LDAP provider for
|
|
||||||
// their users (synapse, Nextcloud, Jellyfin, ...).
|
|
||||||
//
|
|
||||||
// LDAP users are crated with a dummy password but non empty because an empty
|
|
||||||
// password is reserved for deactivated accounts. The conduwuit password field
|
|
||||||
// will never be read to login a LDAP user so it's not an issue.
|
|
||||||
if !services.users.exists(lowercased_user_id).await {
|
|
||||||
services
|
|
||||||
.users
|
|
||||||
.create(lowercased_user_id, Some("*"), Some("ldap"))
|
|
||||||
.await?;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only sync admin status if LDAP can actually determine it.
|
|
||||||
// None means LDAP cannot determine admin status (manual config required).
|
|
||||||
if let Some(is_ldap_admin) = is_ldap_admin {
|
|
||||||
let is_conduwuit_admin = services.admin.user_is_admin(lowercased_user_id).await;
|
|
||||||
|
|
||||||
if is_ldap_admin && !is_conduwuit_admin {
|
|
||||||
Box::pin(services.admin.make_user_admin(lowercased_user_id)).await?;
|
|
||||||
} else if !is_ldap_admin && is_conduwuit_admin {
|
|
||||||
Box::pin(services.admin.revoke_admin(lowercased_user_id)).await?;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(user_id)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub(crate) async fn handle_login(
|
pub(crate) async fn handle_login(
|
||||||
services: &Services,
|
services: &Services,
|
||||||
identifier: Option<&UserIdentifier>,
|
identifier: Option<&UserIdentifier>,
|
||||||
@@ -212,18 +136,7 @@ pub(crate) async fn handle_login(
|
|||||||
return Err!(Request(Forbidden("This account is not permitted to log in.")));
|
return Err!(Request(Forbidden("This account is not permitted to log in.")));
|
||||||
}
|
}
|
||||||
|
|
||||||
if cfg!(feature = "ldap") && services.config.ldap.enable {
|
password_login(services, &user_id, &lowercased_user_id, password).await
|
||||||
match Box::pin(ldap_login(services, &user_id, &lowercased_user_id, password)).await {
|
|
||||||
| Ok(user_id) => Ok(user_id),
|
|
||||||
| Err(err) if services.config.ldap.ldap_only => Err(err),
|
|
||||||
| Err(err) => {
|
|
||||||
debug_warn!("{err}");
|
|
||||||
password_login(services, &user_id, &lowercased_user_id, password).await
|
|
||||||
},
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
password_login(services, &user_id, &lowercased_user_id, password).await
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # `POST /_matrix/client/v3/login`
|
/// # `POST /_matrix/client/v3/login`
|
||||||
|
|||||||
@@ -172,7 +172,9 @@ pub(crate) async fn create_invite_route(
|
|||||||
let pdu: PduEvent = serde_json::from_value(event.into())
|
let pdu: PduEvent = serde_json::from_value(event.into())
|
||||||
.map_err(|e| err!(Request(BadJson("Invalid invite event PDU: {e}"))))?;
|
.map_err(|e| err!(Request(BadJson("Invalid invite event PDU: {e}"))))?;
|
||||||
|
|
||||||
invite_state.push(RawStrippedState::Pdu(pdu.content.clone()));
|
invite_state.push(RawStrippedState::Pdu(
|
||||||
|
serde_json::value::to_raw_value(&pdu).expect("PDU was just created, it must be valid"),
|
||||||
|
));
|
||||||
|
|
||||||
// If we are active in the room, the remote server will notify us about the
|
// If we are active in the room, the remote server will notify us about the
|
||||||
// join/invite through /send. If we are not in the room, we need to manually
|
// join/invite through /send. If we are not in the room, we need to manually
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ pub(crate) async fn create_knock_event_v1_route(
|
|||||||
let knock_room_state = services
|
let knock_room_state = services
|
||||||
.rooms
|
.rooms
|
||||||
.state
|
.state
|
||||||
.summary_stripped(&pdu, &body.room_id)
|
.summary_stripped(&pdu, &body.room_id, &sender)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
Ok(create_knock_event::v1::Response::new(knock_room_state))
|
Ok(create_knock_event::v1::Response::new(knock_room_state))
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ conduwuit-build-metadata.workspace = true
|
|||||||
const-str.workspace = true
|
const-str.workspace = true
|
||||||
core_affinity.workspace = true
|
core_affinity.workspace = true
|
||||||
ctor.workspace = true
|
ctor.workspace = true
|
||||||
|
dtor.workspace = true
|
||||||
cyborgtime.workspace = true
|
cyborgtime.workspace = true
|
||||||
either.workspace = true
|
either.workspace = true
|
||||||
figment.workspace = true
|
figment.workspace = true
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ type Key = ArrayVec<usize, KEY_SEGS>;
|
|||||||
const NAME_MAX: usize = 128;
|
const NAME_MAX: usize = 128;
|
||||||
const KEY_SEGS: usize = 8;
|
const KEY_SEGS: usize = 8;
|
||||||
|
|
||||||
#[ctor::ctor]
|
#[ctor::ctor(unsafe)]
|
||||||
fn _static_initialization() {
|
fn _static_initialization() {
|
||||||
acq_epoch().expect("pre-initialization of jemalloc failed");
|
acq_epoch().expect("pre-initialization of jemalloc failed");
|
||||||
acq_epoch().expect("pre-initialization of jemalloc failed");
|
acq_epoch().expect("pre-initialization of jemalloc failed");
|
||||||
|
|||||||
+1
-130
@@ -371,6 +371,7 @@ pub struct Config {
|
|||||||
pub ip_lookup_strategy: u8,
|
pub ip_lookup_strategy: u8,
|
||||||
|
|
||||||
/// Max request size for file uploads in bytes. Defaults to 20MB.
|
/// Max request size for file uploads in bytes. Defaults to 20MB.
|
||||||
|
/// Also limits incoming federated media.
|
||||||
///
|
///
|
||||||
/// default: 20971520
|
/// default: 20971520
|
||||||
#[serde(default = "default_max_request_size")]
|
#[serde(default = "default_max_request_size")]
|
||||||
@@ -2129,10 +2130,6 @@ pub struct Config {
|
|||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub allow_web_indexing: bool,
|
pub allow_web_indexing: bool,
|
||||||
|
|
||||||
/// display: nested
|
|
||||||
#[serde(default)]
|
|
||||||
pub ldap: LdapConfig,
|
|
||||||
|
|
||||||
/// Configuration for antispam support
|
/// Configuration for antispam support
|
||||||
/// display: nested
|
/// display: nested
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
@@ -2294,126 +2291,6 @@ impl MatrixRtcConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default, Deserialize)]
|
|
||||||
#[config_example_generator(filename = "conduwuit-example.toml", section = "global.ldap")]
|
|
||||||
pub struct LdapConfig {
|
|
||||||
/// Whether to enable LDAP login.
|
|
||||||
///
|
|
||||||
/// example: "true"
|
|
||||||
#[serde(default)]
|
|
||||||
pub enable: bool,
|
|
||||||
|
|
||||||
/// Whether to force LDAP authentication or authorize classical password
|
|
||||||
/// login.
|
|
||||||
///
|
|
||||||
/// example: "true"
|
|
||||||
#[serde(default)]
|
|
||||||
pub ldap_only: bool,
|
|
||||||
|
|
||||||
/// URI of the LDAP server.
|
|
||||||
///
|
|
||||||
/// example: "ldap://ldap.example.com:389"
|
|
||||||
///
|
|
||||||
/// default: ""
|
|
||||||
#[serde(default)]
|
|
||||||
pub uri: Option<Url>,
|
|
||||||
|
|
||||||
/// StartTLS for LDAP connections.
|
|
||||||
///
|
|
||||||
/// default: false
|
|
||||||
#[serde(default)]
|
|
||||||
pub use_starttls: bool,
|
|
||||||
|
|
||||||
/// Skip TLS certificate verification, possibly dangerous.
|
|
||||||
///
|
|
||||||
/// default: false
|
|
||||||
#[serde(default)]
|
|
||||||
pub disable_tls_verification: bool,
|
|
||||||
|
|
||||||
/// Root of the searches.
|
|
||||||
///
|
|
||||||
/// example: "ou=users,dc=example,dc=org"
|
|
||||||
///
|
|
||||||
/// default: ""
|
|
||||||
#[serde(default)]
|
|
||||||
pub base_dn: String,
|
|
||||||
|
|
||||||
/// Bind DN if anonymous search is not enabled.
|
|
||||||
///
|
|
||||||
/// You can use the variable `{username}` that will be replaced by the
|
|
||||||
/// entered username. In such case, the password used to bind will be the
|
|
||||||
/// one provided for the login and not the one given by
|
|
||||||
/// `bind_password_file`. Beware: automatically granting admin rights will
|
|
||||||
/// not work if you use this direct bind instead of a LDAP search.
|
|
||||||
///
|
|
||||||
/// example: "cn=ldap-reader,dc=example,dc=org" or
|
|
||||||
/// "cn={username},ou=users,dc=example,dc=org"
|
|
||||||
///
|
|
||||||
/// default: ""
|
|
||||||
#[serde(default)]
|
|
||||||
pub bind_dn: Option<String>,
|
|
||||||
|
|
||||||
/// Path to a file on the system that contains the password for the
|
|
||||||
/// `bind_dn`.
|
|
||||||
///
|
|
||||||
/// The server must be able to access the file, and it must not be empty.
|
|
||||||
///
|
|
||||||
/// default: ""
|
|
||||||
#[serde(default)]
|
|
||||||
pub bind_password_file: Option<PathBuf>,
|
|
||||||
|
|
||||||
/// Search filter to limit user searches.
|
|
||||||
///
|
|
||||||
/// You can use the variable `{username}` that will be replaced by the
|
|
||||||
/// entered username for more complex filters.
|
|
||||||
///
|
|
||||||
/// example: "(&(objectClass=person)(memberOf=matrix))"
|
|
||||||
///
|
|
||||||
/// default: "(objectClass=*)"
|
|
||||||
#[serde(default = "default_ldap_search_filter")]
|
|
||||||
pub filter: String,
|
|
||||||
|
|
||||||
/// Attribute to use to uniquely identify the user.
|
|
||||||
///
|
|
||||||
/// example: "uid" or "cn"
|
|
||||||
///
|
|
||||||
/// default: "uid"
|
|
||||||
#[serde(default = "default_ldap_uid_attribute")]
|
|
||||||
pub uid_attribute: String,
|
|
||||||
|
|
||||||
/// Attribute containing the display name of the user.
|
|
||||||
///
|
|
||||||
/// example: "givenName" or "sn"
|
|
||||||
///
|
|
||||||
/// default: "givenName"
|
|
||||||
#[serde(default = "default_ldap_name_attribute")]
|
|
||||||
pub name_attribute: String,
|
|
||||||
|
|
||||||
/// Root of the searches for admin users.
|
|
||||||
///
|
|
||||||
/// Defaults to `base_dn` if empty.
|
|
||||||
///
|
|
||||||
/// example: "ou=admins,dc=example,dc=org"
|
|
||||||
///
|
|
||||||
/// default: ""
|
|
||||||
#[serde(default)]
|
|
||||||
pub admin_base_dn: String,
|
|
||||||
|
|
||||||
/// The LDAP search filter to find administrative users for continuwuity.
|
|
||||||
///
|
|
||||||
/// If left blank, administrative state must be configured manually for each
|
|
||||||
/// user.
|
|
||||||
///
|
|
||||||
/// You can use the variable `{username}` that will be replaced by the
|
|
||||||
/// entered username for more complex filters.
|
|
||||||
///
|
|
||||||
/// example: "(objectClass=conduwuitAdmin)" or "(uid={username})"
|
|
||||||
///
|
|
||||||
/// default: ""
|
|
||||||
#[serde(default)]
|
|
||||||
pub admin_filter: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Deserialize, Clone, Debug)]
|
#[derive(Deserialize, Clone, Debug)]
|
||||||
#[serde(transparent)]
|
#[serde(transparent)]
|
||||||
struct ListeningPort {
|
struct ListeningPort {
|
||||||
@@ -2934,9 +2811,3 @@ pub(super) fn default_blurhash_x_component() -> u32 { 4 }
|
|||||||
pub(super) fn default_blurhash_y_component() -> u32 { 3 }
|
pub(super) fn default_blurhash_y_component() -> u32 { 3 }
|
||||||
|
|
||||||
// end recommended & blurhashing defaults
|
// end recommended & blurhashing defaults
|
||||||
|
|
||||||
fn default_ldap_search_filter() -> String { "(objectClass=*)".to_owned() }
|
|
||||||
|
|
||||||
fn default_ldap_uid_attribute() -> String { String::from("uid") }
|
|
||||||
|
|
||||||
fn default_ldap_name_attribute() -> String { String::from("givenName") }
|
|
||||||
+1
-1
@@ -62,7 +62,7 @@ pub const INFO_SPAN_LEVEL: Level = if cfg!(debug_assertions) {
|
|||||||
pub static DEBUGGER: LazyLock<bool> =
|
pub static DEBUGGER: LazyLock<bool> =
|
||||||
LazyLock::new(|| env::var("_").unwrap_or_default().ends_with("gdb"));
|
LazyLock::new(|| env::var("_").unwrap_or_default().ends_with("gdb"));
|
||||||
|
|
||||||
#[cfg_attr(debug_assertions, ctor::ctor)]
|
#[cfg_attr(debug_assertions, ctor::ctor(unsafe))]
|
||||||
#[cfg_attr(not(debug_assertions), allow(dead_code))]
|
#[cfg_attr(not(debug_assertions), allow(dead_code))]
|
||||||
fn set_panic_trap() {
|
fn set_panic_trap() {
|
||||||
if !*DEBUGGER {
|
if !*DEBUGGER {
|
||||||
|
|||||||
@@ -110,8 +110,6 @@ pub enum Error {
|
|||||||
InconsistentRoomState(&'static str, ruma::OwnedRoomId),
|
InconsistentRoomState(&'static str, ruma::OwnedRoomId),
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
IntoHttp(#[from] ruma::api::error::IntoHttpError),
|
IntoHttp(#[from] ruma::api::error::IntoHttpError),
|
||||||
#[error("{0}")]
|
|
||||||
Ldap(Cow<'static, str>),
|
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Mxc(#[from] ruma::MxcUriError),
|
Mxc(#[from] ruma::MxcUriError),
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ conduwuit-core.workspace = true
|
|||||||
conduwuit-macros.workspace = true
|
conduwuit-macros.workspace = true
|
||||||
const-str.workspace = true
|
const-str.workspace = true
|
||||||
ctor.workspace = true
|
ctor.workspace = true
|
||||||
|
dtor.workspace = true
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
log.workspace = true
|
log.workspace = true
|
||||||
minicbor.workspace = true
|
minicbor.workspace = true
|
||||||
|
|||||||
@@ -32,11 +32,11 @@ pub(super) fn introspect(_args: TokenStream) -> Result<TokenStream> {
|
|||||||
const CRATE_NAME: &str = #crate_name;
|
const CRATE_NAME: &str = #crate_name;
|
||||||
|
|
||||||
/// Register this crate's features with the global registry during static initialization
|
/// Register this crate's features with the global registry during static initialization
|
||||||
#[::ctor::ctor]
|
#[::ctor::ctor(unsafe)]
|
||||||
fn register() {
|
fn register() {
|
||||||
conduwuit_core::info::introspection::ENABLED_FEATURES.lock().unwrap().insert(#crate_name, &ENABLED);
|
conduwuit_core::info::introspection::ENABLED_FEATURES.lock().unwrap().insert(#crate_name, &ENABLED);
|
||||||
}
|
}
|
||||||
#[::ctor::dtor]
|
#[::dtor::dtor(unsafe)]
|
||||||
fn unregister() {
|
fn unregister() {
|
||||||
conduwuit_core::info::introspection::ENABLED_FEATURES.lock().unwrap().remove(#crate_name);
|
conduwuit_core::info::introspection::ENABLED_FEATURES.lock().unwrap().remove(#crate_name);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-4
@@ -55,7 +55,6 @@ standard = [
|
|||||||
"jemalloc",
|
"jemalloc",
|
||||||
"jemalloc_conf",
|
"jemalloc_conf",
|
||||||
"journald",
|
"journald",
|
||||||
"ldap",
|
|
||||||
"media_thumbnail",
|
"media_thumbnail",
|
||||||
"systemd",
|
"systemd",
|
||||||
"url_preview",
|
"url_preview",
|
||||||
@@ -126,9 +125,6 @@ jemalloc_stats = [
|
|||||||
jemalloc_conf = [
|
jemalloc_conf = [
|
||||||
"conduwuit-core/jemalloc_conf",
|
"conduwuit-core/jemalloc_conf",
|
||||||
]
|
]
|
||||||
ldap = [
|
|
||||||
"conduwuit-api/ldap",
|
|
||||||
]
|
|
||||||
media_thumbnail = [
|
media_thumbnail = [
|
||||||
"conduwuit-service/media_thumbnail",
|
"conduwuit-service/media_thumbnail",
|
||||||
]
|
]
|
||||||
@@ -217,6 +213,7 @@ conduwuit-macros.workspace = true
|
|||||||
|
|
||||||
clap.workspace = true
|
clap.workspace = true
|
||||||
ctor.workspace = true
|
ctor.workspace = true
|
||||||
|
dtor.workspace = true
|
||||||
console-subscriber.optional = true
|
console-subscriber.optional = true
|
||||||
console-subscriber.workspace = true
|
console-subscriber.workspace = true
|
||||||
const-str.workspace = true
|
const-str.workspace = true
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ conduwuit-service.workspace = true
|
|||||||
conduwuit-web.workspace = true
|
conduwuit-web.workspace = true
|
||||||
const-str.workspace = true
|
const-str.workspace = true
|
||||||
ctor.workspace = true
|
ctor.workspace = true
|
||||||
|
dtor.workspace = true
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
http.workspace = true
|
http.workspace = true
|
||||||
http-body-util.workspace = true
|
http-body-util.workspace = true
|
||||||
|
|||||||
@@ -52,9 +52,6 @@ jemalloc_stats = [
|
|||||||
"conduwuit-core/jemalloc_stats",
|
"conduwuit-core/jemalloc_stats",
|
||||||
"conduwuit-database/jemalloc_stats",
|
"conduwuit-database/jemalloc_stats",
|
||||||
]
|
]
|
||||||
ldap = [
|
|
||||||
"dep:ldap3"
|
|
||||||
]
|
|
||||||
media_thumbnail = [
|
media_thumbnail = [
|
||||||
"dep:image",
|
"dep:image",
|
||||||
]
|
]
|
||||||
@@ -89,6 +86,7 @@ conduwuit-database.workspace = true
|
|||||||
conduwuit-macros.workspace = true
|
conduwuit-macros.workspace = true
|
||||||
const-str.workspace = true
|
const-str.workspace = true
|
||||||
ctor.workspace = true
|
ctor.workspace = true
|
||||||
|
dtor.workspace = true
|
||||||
either.workspace = true
|
either.workspace = true
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
governor.workspace = true
|
governor.workspace = true
|
||||||
@@ -98,8 +96,6 @@ image.workspace = true
|
|||||||
image.optional = true
|
image.optional = true
|
||||||
ipaddress.workspace = true
|
ipaddress.workspace = true
|
||||||
itertools.workspace = true
|
itertools.workspace = true
|
||||||
ldap3.workspace = true
|
|
||||||
ldap3.optional = true
|
|
||||||
log.workspace = true
|
log.workspace = true
|
||||||
loole.workspace = true
|
loole.workspace = true
|
||||||
lru-cache.workspace = true
|
lru-cache.workspace = true
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ pub async fn create_admin_room(services: &Services) -> Result {
|
|||||||
|
|
||||||
// Create a user for the server
|
// Create a user for the server
|
||||||
let server_user = services.globals.server_user.as_ref();
|
let server_user = services.globals.server_user.as_ref();
|
||||||
services.users.create(server_user, None, None).await?;
|
services.users.create(server_user, None).await?;
|
||||||
|
|
||||||
let mut create_content = {
|
let mut create_content = {
|
||||||
use RoomVersionId::*;
|
use RoomVersionId::*;
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ impl Service {
|
|||||||
if !self.services.users.exists(&appservice_user_id).await {
|
if !self.services.users.exists(&appservice_user_id).await {
|
||||||
self.services
|
self.services
|
||||||
.users
|
.users
|
||||||
.create(&appservice_user_id, None, None)
|
.create(&appservice_user_id, None)
|
||||||
.await?;
|
.await?;
|
||||||
} else if self
|
} else if self
|
||||||
.services
|
.services
|
||||||
|
|||||||
@@ -37,11 +37,6 @@ impl crate::Service for Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn worker(self: Arc<Self>) -> Result {
|
async fn worker(self: Arc<Self>) -> Result {
|
||||||
if self.services.config.ldap.enable {
|
|
||||||
warn!("emergency password feature not available with LDAP enabled.");
|
|
||||||
return Ok(());
|
|
||||||
}
|
|
||||||
|
|
||||||
self.set_emergency_access().await.inspect_err(|e| {
|
self.set_emergency_access().await.inspect_err(|e| {
|
||||||
error!("Could not set the configured emergency password for the server user: {e}");
|
error!("Could not set the configured emergency password for the server user: {e}");
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -802,7 +802,7 @@ async fn fix_local_invite_state(services: &Services) -> Result {
|
|||||||
&& services.globals.user_is_local(&membership_event.sender) {
|
&& services.globals.user_is_local(&membership_event.sender) {
|
||||||
|
|
||||||
// build and save stripped state for their invite in the database
|
// build and save stripped state for their invite in the database
|
||||||
let stripped_state = services.rooms.state.summary_stripped(&membership_event, &room_id).await;
|
let stripped_state = services.rooms.state.summary_stripped(&membership_event, &room_id, &user_id).await;
|
||||||
userroomid_invitestate.put((&user_id, &room_id), Json(stripped_state));
|
userroomid_invitestate.put((&user_id, &room_id), Json(stripped_state));
|
||||||
fixed = fixed.saturating_add(1);
|
fixed = fixed.saturating_add(1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,17 +58,6 @@ impl Service {
|
|||||||
return Err!("Cannot issue a password reset token for the server user");
|
return Err!("Cannot issue a password reset token for the server user");
|
||||||
}
|
}
|
||||||
|
|
||||||
if self
|
|
||||||
.services
|
|
||||||
.users
|
|
||||||
.origin(&user_id)
|
|
||||||
.await
|
|
||||||
.unwrap_or_else(|_| "password".to_owned())
|
|
||||||
!= "password"
|
|
||||||
{
|
|
||||||
return Err!("Cannot issue a password reset token for non-internal user {user_id}");
|
|
||||||
}
|
|
||||||
|
|
||||||
if self.services.users.is_deactivated(&user_id).await? {
|
if self.services.users.is_deactivated(&user_id).await? {
|
||||||
return Err!("Cannot issue a password reset token for deactivated user {user_id}");
|
return Err!("Cannot issue a password reset token for deactivated user {user_id}");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -300,12 +300,13 @@ impl Service {
|
|||||||
&self,
|
&self,
|
||||||
event: &'a E,
|
event: &'a E,
|
||||||
room_id: &RoomId,
|
room_id: &RoomId,
|
||||||
|
target_user: &UserId,
|
||||||
) -> Vec<RawStrippedState>
|
) -> Vec<RawStrippedState>
|
||||||
where
|
where
|
||||||
E: Event + Send + Sync,
|
E: Event + Send + Sync,
|
||||||
&'a E: Event + Send,
|
&'a E: Event + Send,
|
||||||
{
|
{
|
||||||
let cells = [
|
let mut state_events = [
|
||||||
(&StateEventType::RoomCreate, ""),
|
(&StateEventType::RoomCreate, ""),
|
||||||
(&StateEventType::RoomJoinRules, ""),
|
(&StateEventType::RoomJoinRules, ""),
|
||||||
(&StateEventType::RoomCanonicalAlias, ""),
|
(&StateEventType::RoomCanonicalAlias, ""),
|
||||||
@@ -314,9 +315,14 @@ impl Service {
|
|||||||
(&StateEventType::RoomMember, event.sender().as_str()), // Add recommended events
|
(&StateEventType::RoomMember, event.sender().as_str()), // Add recommended events
|
||||||
(&StateEventType::RoomEncryption, ""),
|
(&StateEventType::RoomEncryption, ""),
|
||||||
(&StateEventType::RoomTopic, ""),
|
(&StateEventType::RoomTopic, ""),
|
||||||
];
|
]
|
||||||
|
.to_vec();
|
||||||
|
|
||||||
let fetches = cells.into_iter().map(|(event_type, state_key)| {
|
if target_user != event.sender() {
|
||||||
|
state_events.push((&StateEventType::RoomMember, target_user.as_str()));
|
||||||
|
}
|
||||||
|
|
||||||
|
let fetches = state_events.into_iter().map(|(event_type, state_key)| {
|
||||||
self.services
|
self.services
|
||||||
.state_accessor
|
.state_accessor
|
||||||
.room_state_get(room_id, event_type, state_key)
|
.room_state_get(room_id, event_type, state_key)
|
||||||
@@ -326,7 +332,7 @@ impl Service {
|
|||||||
.await
|
.await
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map(Result::ok)
|
.filter_map(Result::ok)
|
||||||
.map(|pdu| RawStrippedState::Pdu(pdu.content))
|
.map(|pdu| RawStrippedState::Pdu(serde_json::value::to_raw_value(&pdu).unwrap()))
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ pub async fn update_membership(
|
|||||||
#[allow(clippy::collapsible_if)]
|
#[allow(clippy::collapsible_if)]
|
||||||
if !self.services.globals.user_is_local(user_id) {
|
if !self.services.globals.user_is_local(user_id) {
|
||||||
if !self.services.users.exists(user_id).await {
|
if !self.services.users.exists(user_id).await {
|
||||||
self.services.users.create(user_id, None, None).await?;
|
self.services.users.create(user_id, None).await?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,7 +119,11 @@ pub async fn update_membership(
|
|||||||
self.mark_as_joined(user_id, room_id);
|
self.mark_as_joined(user_id, room_id);
|
||||||
},
|
},
|
||||||
| MembershipState::Invite => {
|
| MembershipState::Invite => {
|
||||||
let last_state = self.services.state.summary_stripped(pdu, room_id).await;
|
let last_state = self
|
||||||
|
.services
|
||||||
|
.state
|
||||||
|
.summary_stripped(pdu, room_id, user_id)
|
||||||
|
.await;
|
||||||
|
|
||||||
self.mark_as_invited(user_id, room_id, pdu.sender(), last_state, None)
|
self.mark_as_invited(user_id, room_id, pdu.sender(), last_state, None)
|
||||||
.await?;
|
.await?;
|
||||||
|
|||||||
@@ -385,23 +385,6 @@ impl Service {
|
|||||||
password_verified = hash::verify_password(password, &hash).is_ok();
|
password_verified = hash::verify_password(password, &hash).is_ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
// If local password verification failed, try LDAP authentication
|
|
||||||
#[cfg(feature = "ldap")]
|
|
||||||
if !password_verified && self.services.config.ldap.enable {
|
|
||||||
// Search for user in LDAP to get their DN
|
|
||||||
if let Ok(dns) = self.services.users.search_ldap(&user_id).await {
|
|
||||||
if let Some((user_dn, _is_admin)) = dns.first() {
|
|
||||||
// Try to authenticate with LDAP
|
|
||||||
password_verified = self
|
|
||||||
.services
|
|
||||||
.users
|
|
||||||
.auth_ldap(user_dn, password)
|
|
||||||
.await
|
|
||||||
.is_ok();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if password_verified {
|
if password_verified {
|
||||||
identity.try_set_localpart(user_id.localpart().to_owned())?;
|
identity.try_set_localpart(user_id.localpart().to_owned())?;
|
||||||
|
|
||||||
|
|||||||
+4
-220
@@ -1,21 +1,13 @@
|
|||||||
pub(super) mod dehydrated_device;
|
pub(super) mod dehydrated_device;
|
||||||
|
|
||||||
#[cfg(feature = "ldap")]
|
|
||||||
use std::collections::HashMap;
|
|
||||||
use std::{collections::BTreeMap, mem, net::IpAddr, sync::Arc};
|
use std::{collections::BTreeMap, mem, net::IpAddr, sync::Arc};
|
||||||
|
|
||||||
#[cfg(feature = "ldap")]
|
|
||||||
use conduwuit::result::LogErr;
|
|
||||||
use conduwuit::{
|
use conduwuit::{
|
||||||
Err, Error, Result, Server, debug_warn, err, is_equal_to, trace,
|
Err, Error, Result, Server, debug_warn, err, trace,
|
||||||
utils::{self, ReadyExt, stream::TryIgnore, string::Unquoted},
|
utils::{self, ReadyExt, stream::TryIgnore, string::Unquoted},
|
||||||
};
|
};
|
||||||
#[cfg(feature = "ldap")]
|
|
||||||
use conduwuit_core::{debug, error};
|
|
||||||
use database::{Deserialized, Ignore, Interfix, Json, Map};
|
use database::{Deserialized, Ignore, Interfix, Json, Map};
|
||||||
use futures::{Stream, StreamExt, TryFutureExt};
|
use futures::{Stream, StreamExt, TryFutureExt};
|
||||||
#[cfg(feature = "ldap")]
|
|
||||||
use ldap3::{LdapConnAsync, LdapConnSettings, Scope, SearchEntry};
|
|
||||||
use ruma::{
|
use ruma::{
|
||||||
DeviceId, KeyId, MilliSecondsSinceUnixEpoch, OneTimeKeyAlgorithm, OneTimeKeyId,
|
DeviceId, KeyId, MilliSecondsSinceUnixEpoch, OneTimeKeyAlgorithm, OneTimeKeyId,
|
||||||
OneTimeKeyName, OwnedDeviceId, OwnedKeyId, OwnedMxcUri, OwnedUserId, RoomId, UInt, UserId,
|
OneTimeKeyName, OwnedDeviceId, OwnedKeyId, OwnedMxcUri, OwnedUserId, RoomId, UInt, UserId,
|
||||||
@@ -79,7 +71,6 @@ struct Data {
|
|||||||
userid_displayname: Arc<Map>,
|
userid_displayname: Arc<Map>,
|
||||||
userid_lastonetimekeyupdate: Arc<Map>,
|
userid_lastonetimekeyupdate: Arc<Map>,
|
||||||
userid_masterkeyid: Arc<Map>,
|
userid_masterkeyid: Arc<Map>,
|
||||||
userid_origin: Arc<Map>,
|
|
||||||
userid_password: Arc<Map>,
|
userid_password: Arc<Map>,
|
||||||
userid_suspension: Arc<Map>,
|
userid_suspension: Arc<Map>,
|
||||||
userid_lock: Arc<Map>,
|
userid_lock: Arc<Map>,
|
||||||
@@ -120,7 +111,6 @@ impl crate::Service for Service {
|
|||||||
userid_displayname: args.db["userid_displayname"].clone(),
|
userid_displayname: args.db["userid_displayname"].clone(),
|
||||||
userid_lastonetimekeyupdate: args.db["userid_lastonetimekeyupdate"].clone(),
|
userid_lastonetimekeyupdate: args.db["userid_lastonetimekeyupdate"].clone(),
|
||||||
userid_masterkeyid: args.db["userid_masterkeyid"].clone(),
|
userid_masterkeyid: args.db["userid_masterkeyid"].clone(),
|
||||||
userid_origin: args.db["userid_origin"].clone(),
|
|
||||||
userid_password: args.db["userid_password"].clone(),
|
userid_password: args.db["userid_password"].clone(),
|
||||||
userid_suspension: args.db["userid_suspension"].clone(),
|
userid_suspension: args.db["userid_suspension"].clone(),
|
||||||
userid_lock: args.db["userid_lock"].clone(),
|
userid_lock: args.db["userid_lock"].clone(),
|
||||||
@@ -178,26 +168,12 @@ impl Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Create a new user account on this homeserver.
|
/// Create a new user account on this homeserver.
|
||||||
///
|
|
||||||
/// User origin is by default "password" (meaning that it will login using
|
|
||||||
/// its user_id/password). Users with other origins (currently only "ldap"
|
|
||||||
/// is available) have special login processes.
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub async fn create(
|
pub async fn create(&self, user_id: &UserId, password: Option<&str>) -> Result<()> {
|
||||||
&self,
|
if !self.services.globals.user_is_local(user_id) && password.is_some() {
|
||||||
user_id: &UserId,
|
return Err!("Cannot create a nonlocal user with a set password");
|
||||||
password: Option<&str>,
|
|
||||||
origin: Option<&str>,
|
|
||||||
) -> Result<()> {
|
|
||||||
if !self.services.globals.user_is_local(user_id)
|
|
||||||
&& (password.is_some() || origin.is_some())
|
|
||||||
{
|
|
||||||
return Err!("Cannot create a nonlocal user with a set password or origin");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self.db
|
|
||||||
.userid_origin
|
|
||||||
.insert(user_id, origin.unwrap_or("password"));
|
|
||||||
self.set_password(user_id, password).await?;
|
self.set_password(user_id, password).await?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
@@ -360,11 +336,6 @@ impl Service {
|
|||||||
.ready_filter_map(|(u, p): (OwnedUserId, &[u8])| (!p.is_empty()).then_some(u))
|
.ready_filter_map(|(u, p): (OwnedUserId, &[u8])| (!p.is_empty()).then_some(u))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the origin of the user (password/LDAP/...).
|
|
||||||
pub async fn origin(&self, user_id: &UserId) -> Result<String> {
|
|
||||||
self.db.userid_origin.get(user_id).await.deserialized()
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the password hash for the given user.
|
/// Returns the password hash for the given user.
|
||||||
pub async fn password_hash(&self, user_id: &UserId) -> Result<String> {
|
pub async fn password_hash(&self, user_id: &UserId) -> Result<String> {
|
||||||
self.db.userid_password.get(user_id).await.deserialized()
|
self.db.userid_password.get(user_id).await.deserialized()
|
||||||
@@ -372,22 +343,6 @@ impl Service {
|
|||||||
|
|
||||||
/// Hash and set the user's password to the Argon2 hash
|
/// Hash and set the user's password to the Argon2 hash
|
||||||
pub async fn set_password(&self, user_id: &UserId, password: Option<&str>) -> Result<()> {
|
pub async fn set_password(&self, user_id: &UserId, password: Option<&str>) -> Result<()> {
|
||||||
// Cannot change the password of a LDAP user. There are two special cases :
|
|
||||||
// - a `None` password can be used to deactivate a LDAP user
|
|
||||||
// - a "*" password is used as the default password of an active LDAP user
|
|
||||||
if cfg!(feature = "ldap")
|
|
||||||
&& password.is_some_and(|pwd| pwd != "*")
|
|
||||||
&& self
|
|
||||||
.db
|
|
||||||
.userid_origin
|
|
||||||
.get(user_id)
|
|
||||||
.await
|
|
||||||
.deserialized::<String>()
|
|
||||||
.is_ok_and(is_equal_to!("ldap"))
|
|
||||||
{
|
|
||||||
return Err!(Request(InvalidParam("Cannot change password of a LDAP user")));
|
|
||||||
}
|
|
||||||
|
|
||||||
password
|
password
|
||||||
.map(utils::hash::password)
|
.map(utils::hash::password)
|
||||||
.transpose()
|
.transpose()
|
||||||
@@ -1292,177 +1247,6 @@ impl Service {
|
|||||||
.ready_for_each(|(key, _)| self.set_profile_key(user_id, &key, None))
|
.ready_for_each(|(key, _)| self.set_profile_key(user_id, &key, None))
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "ldap")]
|
|
||||||
async fn create_ldap_connection(
|
|
||||||
config: &conduwuit_core::config::LdapConfig,
|
|
||||||
uri: &str,
|
|
||||||
) -> Result<(LdapConnAsync, ldap3::Ldap), ldap3::LdapError> {
|
|
||||||
let mut settings = LdapConnSettings::new();
|
|
||||||
|
|
||||||
if config.use_starttls {
|
|
||||||
settings = settings.set_starttls(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if config.disable_tls_verification {
|
|
||||||
settings = settings.set_no_tls_verify(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
LdapConnAsync::with_settings(settings, uri).await
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(not(feature = "ldap"))]
|
|
||||||
pub async fn search_ldap(&self, _user_id: &UserId) -> Result<Vec<(String, Option<bool>)>> {
|
|
||||||
Err!(FeatureDisabled("ldap"))
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "ldap")]
|
|
||||||
pub async fn search_ldap(&self, user_id: &UserId) -> Result<Vec<(String, Option<bool>)>> {
|
|
||||||
let localpart = user_id.localpart().to_owned();
|
|
||||||
let lowercased_localpart = localpart.to_lowercase();
|
|
||||||
|
|
||||||
let config = &self.services.server.config.ldap;
|
|
||||||
let uri = config
|
|
||||||
.uri
|
|
||||||
.as_ref()
|
|
||||||
.ok_or_else(|| err!(Ldap(error!("LDAP URI is not configured."))))?;
|
|
||||||
|
|
||||||
debug!(?uri, "LDAP creating connection...");
|
|
||||||
let (conn, mut ldap) = Self::create_ldap_connection(config, uri.as_str())
|
|
||||||
.await
|
|
||||||
.map_err(|e| err!(Ldap(error!(%user_id, "LDAP connection setup error: {e}"))))?;
|
|
||||||
|
|
||||||
let driver = self.services.server.runtime().spawn(async move {
|
|
||||||
match conn.drive().await {
|
|
||||||
| Err(e) => error!("LDAP connection error: {e}"),
|
|
||||||
| Ok(()) => debug!("LDAP connection completed."),
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
match (&config.bind_dn, &config.bind_password_file) {
|
|
||||||
| (Some(bind_dn), Some(bind_password_file)) => {
|
|
||||||
let bind_pw = String::from_utf8(std::fs::read(bind_password_file)?)?;
|
|
||||||
ldap.simple_bind(bind_dn, bind_pw.trim())
|
|
||||||
.await
|
|
||||||
.and_then(ldap3::LdapResult::success)
|
|
||||||
.map_err(|e| err!(Ldap(error!("LDAP bind error: {e}"))))?;
|
|
||||||
},
|
|
||||||
| (..) => {},
|
|
||||||
}
|
|
||||||
|
|
||||||
let attr = [&config.uid_attribute, &config.name_attribute];
|
|
||||||
|
|
||||||
let user_filter = &config.filter.replace("{username}", &lowercased_localpart);
|
|
||||||
|
|
||||||
let (entries, _result) = ldap
|
|
||||||
.search(&config.base_dn, Scope::Subtree, user_filter, &attr)
|
|
||||||
.await
|
|
||||||
.and_then(ldap3::SearchResult::success)
|
|
||||||
.inspect(|(entries, result)| trace!(?entries, ?result, "LDAP Search"))
|
|
||||||
.map_err(|e| err!(Ldap(error!(?attr, ?user_filter, "LDAP search error: {e}"))))?;
|
|
||||||
|
|
||||||
let mut dns: HashMap<String, Option<bool>> = entries
|
|
||||||
.into_iter()
|
|
||||||
.filter_map(|entry| {
|
|
||||||
let search_entry = SearchEntry::construct(entry);
|
|
||||||
debug!(?search_entry, "LDAP search entry");
|
|
||||||
search_entry
|
|
||||||
.attrs
|
|
||||||
.get(&config.uid_attribute)
|
|
||||||
.into_iter()
|
|
||||||
.chain(search_entry.attrs.get(&config.name_attribute))
|
|
||||||
.any(|ids| ids.contains(&localpart) || ids.contains(&lowercased_localpart))
|
|
||||||
.then_some((search_entry.dn, None))
|
|
||||||
})
|
|
||||||
.collect();
|
|
||||||
|
|
||||||
if !config.admin_filter.is_empty() {
|
|
||||||
// Update all existing entries to Some(false) since we can now determine admin
|
|
||||||
// status
|
|
||||||
for admin_status in dns.values_mut() {
|
|
||||||
*admin_status = Some(false);
|
|
||||||
}
|
|
||||||
let admin_base_dn = if config.admin_base_dn.is_empty() {
|
|
||||||
&config.base_dn
|
|
||||||
} else {
|
|
||||||
&config.admin_base_dn
|
|
||||||
};
|
|
||||||
|
|
||||||
let admin_filter = &config
|
|
||||||
.admin_filter
|
|
||||||
.replace("{username}", &lowercased_localpart);
|
|
||||||
|
|
||||||
let (admin_entries, _result) = ldap
|
|
||||||
.search(admin_base_dn, Scope::Subtree, admin_filter, &attr)
|
|
||||||
.await
|
|
||||||
.and_then(ldap3::SearchResult::success)
|
|
||||||
.inspect(|(entries, result)| trace!(?entries, ?result, "LDAP Admin Search"))
|
|
||||||
.map_err(|e| {
|
|
||||||
err!(Ldap(error!(?attr, ?admin_filter, "Ldap admin search error: {e}")))
|
|
||||||
})?;
|
|
||||||
|
|
||||||
dns.extend(admin_entries.into_iter().filter_map(|entry| {
|
|
||||||
let search_entry = SearchEntry::construct(entry);
|
|
||||||
debug!(?search_entry, "LDAP search entry");
|
|
||||||
search_entry
|
|
||||||
.attrs
|
|
||||||
.get(&config.uid_attribute)
|
|
||||||
.into_iter()
|
|
||||||
.chain(search_entry.attrs.get(&config.name_attribute))
|
|
||||||
.any(|ids| ids.contains(&localpart) || ids.contains(&lowercased_localpart))
|
|
||||||
.then_some((search_entry.dn, Some(true)))
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
ldap.unbind()
|
|
||||||
.await
|
|
||||||
.map_err(|e| err!(Ldap(error!("LDAP unbind error: {e}"))))?;
|
|
||||||
|
|
||||||
driver.await.log_err().ok();
|
|
||||||
|
|
||||||
Ok(dns.drain().collect())
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(not(feature = "ldap"))]
|
|
||||||
pub async fn auth_ldap(&self, _user_dn: &str, _password: &str) -> Result {
|
|
||||||
Err!(FeatureDisabled("ldap"))
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "ldap")]
|
|
||||||
pub async fn auth_ldap(&self, user_dn: &str, password: &str) -> Result {
|
|
||||||
let config = &self.services.server.config.ldap;
|
|
||||||
let uri = config
|
|
||||||
.uri
|
|
||||||
.as_ref()
|
|
||||||
.ok_or_else(|| err!(Ldap(error!("LDAP URI is not configured."))))?;
|
|
||||||
|
|
||||||
debug!(?uri, "LDAP creating connection...");
|
|
||||||
let (conn, mut ldap) = Self::create_ldap_connection(config, uri.as_str())
|
|
||||||
.await
|
|
||||||
.map_err(|e| err!(Ldap(error!(%user_dn, "LDAP connection setup error: {e}"))))?;
|
|
||||||
|
|
||||||
let driver = self.services.server.runtime().spawn(async move {
|
|
||||||
match conn.drive().await {
|
|
||||||
| Err(e) => error!("LDAP connection error: {e}"),
|
|
||||||
| Ok(()) => debug!("LDAP connection completed."),
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
ldap.simple_bind(user_dn, password)
|
|
||||||
.await
|
|
||||||
.and_then(ldap3::LdapResult::success)
|
|
||||||
.map_err(|e| {
|
|
||||||
err!(Request(Forbidden(debug_error!("LDAP authentication error: {e}"))))
|
|
||||||
})?;
|
|
||||||
|
|
||||||
ldap.unbind()
|
|
||||||
.await
|
|
||||||
.map_err(|e| err!(Ldap(error!("LDAP unbind error: {e}"))))?;
|
|
||||||
|
|
||||||
driver.await.log_err().ok();
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_master_key(
|
pub fn parse_master_key(
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ conduwuit-admin.workspace = true
|
|||||||
conduwuit.workspace = true
|
conduwuit.workspace = true
|
||||||
clap.workspace = true
|
clap.workspace = true
|
||||||
|
|
||||||
askama = "0.15.1"
|
askama = "0.16.0"
|
||||||
cargo_metadata = "0.23.1"
|
cargo_metadata = "0.23.1"
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
|
|||||||
Reference in new issue
Block a user