Skip to content

Commit 84766e3

Browse files
authored
Automatic merge back to main (#4070)
2 parents fa06e37 + 5d838ed commit 84766e3

File tree

5 files changed

+68
-62
lines changed

5 files changed

+68
-62
lines changed

Cargo.lock

Lines changed: 27 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ members = ["crates/*"]
44
resolver = "2"
55

66
# Updated in the CI with a `sed` command
7-
package.version = "0.14.0"
7+
package.version = "0.14.1"
88
package.license = "AGPL-3.0-only"
99
package.authors = ["Element Backend Team"]
1010
package.edition = "2021"
@@ -27,34 +27,34 @@ broken_intra_doc_links = "deny"
2727
[workspace.dependencies]
2828

2929
# Workspace crates
30-
mas-axum-utils = { path = "./crates/axum-utils/", version = "=0.14.0" }
31-
mas-cli = { path = "./crates/cli/", version = "=0.14.0" }
32-
mas-config = { path = "./crates/config/", version = "=0.14.0" }
33-
mas-data-model = { path = "./crates/data-model/", version = "=0.14.0" }
34-
mas-email = { path = "./crates/email/", version = "=0.14.0" }
35-
mas-graphql = { path = "./crates/graphql/", version = "=0.14.0" }
36-
mas-handlers = { path = "./crates/handlers/", version = "=0.14.0" }
37-
mas-http = { path = "./crates/http/", version = "=0.14.0" }
38-
mas-i18n = { path = "./crates/i18n/", version = "=0.14.0" }
39-
mas-i18n-scan = { path = "./crates/i18n-scan/", version = "=0.14.0" }
40-
mas-iana = { path = "./crates/iana/", version = "=0.14.0" }
41-
mas-iana-codegen = { path = "./crates/iana-codegen/", version = "=0.14.0" }
42-
mas-jose = { path = "./crates/jose/", version = "=0.14.0" }
43-
mas-keystore = { path = "./crates/keystore/", version = "=0.14.0" }
44-
mas-listener = { path = "./crates/listener/", version = "=0.14.0" }
45-
mas-matrix = { path = "./crates/matrix/", version = "=0.14.0" }
46-
mas-matrix-synapse = { path = "./crates/matrix-synapse/", version = "=0.14.0" }
47-
mas-oidc-client = { path = "./crates/oidc-client/", version = "=0.14.0" }
48-
mas-policy = { path = "./crates/policy/", version = "=0.14.0" }
49-
mas-router = { path = "./crates/router/", version = "=0.14.0" }
50-
mas-spa = { path = "./crates/spa/", version = "=0.14.0" }
51-
mas-storage = { path = "./crates/storage/", version = "=0.14.0" }
52-
mas-storage-pg = { path = "./crates/storage-pg/", version = "=0.14.0" }
53-
mas-tasks = { path = "./crates/tasks/", version = "=0.14.0" }
54-
mas-templates = { path = "./crates/templates/", version = "=0.14.0" }
55-
mas-tower = { path = "./crates/tower/", version = "=0.14.0" }
56-
oauth2-types = { path = "./crates/oauth2-types/", version = "=0.14.0" }
57-
syn2mas = { path = "./crates/syn2mas", version = "=0.14.0" }
30+
mas-axum-utils = { path = "./crates/axum-utils/", version = "=0.14.1" }
31+
mas-cli = { path = "./crates/cli/", version = "=0.14.1" }
32+
mas-config = { path = "./crates/config/", version = "=0.14.1" }
33+
mas-data-model = { path = "./crates/data-model/", version = "=0.14.1" }
34+
mas-email = { path = "./crates/email/", version = "=0.14.1" }
35+
mas-graphql = { path = "./crates/graphql/", version = "=0.14.1" }
36+
mas-handlers = { path = "./crates/handlers/", version = "=0.14.1" }
37+
mas-http = { path = "./crates/http/", version = "=0.14.1" }
38+
mas-i18n = { path = "./crates/i18n/", version = "=0.14.1" }
39+
mas-i18n-scan = { path = "./crates/i18n-scan/", version = "=0.14.1" }
40+
mas-iana = { path = "./crates/iana/", version = "=0.14.1" }
41+
mas-iana-codegen = { path = "./crates/iana-codegen/", version = "=0.14.1" }
42+
mas-jose = { path = "./crates/jose/", version = "=0.14.1" }
43+
mas-keystore = { path = "./crates/keystore/", version = "=0.14.1" }
44+
mas-listener = { path = "./crates/listener/", version = "=0.14.1" }
45+
mas-matrix = { path = "./crates/matrix/", version = "=0.14.1" }
46+
mas-matrix-synapse = { path = "./crates/matrix-synapse/", version = "=0.14.1" }
47+
mas-oidc-client = { path = "./crates/oidc-client/", version = "=0.14.1" }
48+
mas-policy = { path = "./crates/policy/", version = "=0.14.1" }
49+
mas-router = { path = "./crates/router/", version = "=0.14.1" }
50+
mas-spa = { path = "./crates/spa/", version = "=0.14.1" }
51+
mas-storage = { path = "./crates/storage/", version = "=0.14.1" }
52+
mas-storage-pg = { path = "./crates/storage-pg/", version = "=0.14.1" }
53+
mas-tasks = { path = "./crates/tasks/", version = "=0.14.1" }
54+
mas-templates = { path = "./crates/templates/", version = "=0.14.1" }
55+
mas-tower = { path = "./crates/tower/", version = "=0.14.1" }
56+
oauth2-types = { path = "./crates/oauth2-types/", version = "=0.14.1" }
57+
syn2mas = { path = "./crates/syn2mas", version = "=0.14.1" }
5858

5959
# OpenAPI schema generation and validation
6060
[workspace.dependencies.aide]

crates/cli/src/server.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,15 @@ pub fn build_router(
238238
}
239239
}
240240

241-
if let Some(prefix) = prefix {
242-
let path = format!("{}/", prefix.trim_end_matches('/'));
243-
router = Router::new().nest(&path, router);
241+
// We normalize the prefix:
242+
// - if it's None, it becomes '/'
243+
// - if it's Some(..), any trailing '/' is first trimmed, then a '/' is added
244+
let prefix = format!("{}/", prefix.unwrap_or_default().trim_end_matches('/'));
245+
// Then we only nest the router if the prefix is not empty and not the root
246+
// If we blindly nest the router if the prefix is Some("/"), axum will panic as
247+
// we're not supposed to nest the router at the root
248+
if !prefix.is_empty() && prefix != "/" {
249+
router = Router::new().nest(&prefix, router);
244250
}
245251

246252
router = router.fallback(mas_handlers::fallback);

tools/syn2mas/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/syn2mas/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vector-im/syn2mas",
3-
"version": "0.14.0",
3+
"version": "0.14.1",
44
"description": "A tool to migrate Synapse users and sessions to the Matrix Authentication Service",
55
"license": "AGPL-3.0-only",
66
"author": "Matrix.org",

0 commit comments

Comments
 (0)