Bump ruma to 1387667de806c37a6d7f72125117009bd618e32a

The significant change is 26edd40a704040e7104161da81c9bae91b7ddcaa,
which removes the global compat feature, so that each compat feature
must now be enabled individually. We're using the slightly later
1387667d because it has a bugfix that ruma needs to compile.

There are a few ruma compat features that were not previously part of
the global compat feature:

 - compat-arbitrary-length-ids
 - compat-upload-signature
 - compat-encrypted-stickers

I have not enabled these here, to avoid a behavior change.
This commit is contained in:
Olivia Lee 2025-07-13 12:59:04 -07:00 committed by Jonas Platte
parent ab5f76f49f
commit b94cc429b7
No known key found for this signature in database
GPG key ID: 7D261D771D915378
4 changed files with 43 additions and 41 deletions

52
Cargo.lock generated
View file

@ -2458,8 +2458,8 @@ dependencies = [
[[package]]
name = "ruma"
version = "0.12.2"
source = "git+https://gitlab.computer.surgery/matrix/ruma.git?rev=ruma-0.12.2%2Bgrapevine-1#4208e8c4c8c2b0e7686aefcdbebf7f2f1d08ee29"
version = "0.12.1"
source = "git+https://github.com/ruma/ruma.git?rev=1387667de806c37a6d7f72125117009bd618e32a#1387667de806c37a6d7f72125117009bd618e32a"
dependencies = [
"assign",
"js_int",
@ -2470,7 +2470,6 @@ dependencies = [
"ruma-events",
"ruma-federation-api",
"ruma-push-gateway-api",
"ruma-server-util",
"ruma-signatures",
"ruma-state-res",
"web-time",
@ -2479,7 +2478,7 @@ dependencies = [
[[package]]
name = "ruma-appservice-api"
version = "0.12.1"
source = "git+https://gitlab.computer.surgery/matrix/ruma.git?rev=ruma-0.12.2%2Bgrapevine-1#4208e8c4c8c2b0e7686aefcdbebf7f2f1d08ee29"
source = "git+https://github.com/ruma/ruma.git?rev=1387667de806c37a6d7f72125117009bd618e32a#1387667de806c37a6d7f72125117009bd618e32a"
dependencies = [
"js_int",
"ruma-common",
@ -2490,8 +2489,8 @@ dependencies = [
[[package]]
name = "ruma-client-api"
version = "0.20.2"
source = "git+https://gitlab.computer.surgery/matrix/ruma.git?rev=ruma-0.12.2%2Bgrapevine-1#4208e8c4c8c2b0e7686aefcdbebf7f2f1d08ee29"
version = "0.20.1"
source = "git+https://github.com/ruma/ruma.git?rev=1387667de806c37a6d7f72125117009bd618e32a#1387667de806c37a6d7f72125117009bd618e32a"
dependencies = [
"as_variant",
"assign",
@ -2513,8 +2512,8 @@ dependencies = [
[[package]]
name = "ruma-common"
version = "0.15.2"
source = "git+https://gitlab.computer.surgery/matrix/ruma.git?rev=ruma-0.12.2%2Bgrapevine-1#4208e8c4c8c2b0e7686aefcdbebf7f2f1d08ee29"
version = "0.15.1"
source = "git+https://github.com/ruma/ruma.git?rev=1387667de806c37a6d7f72125117009bd618e32a#1387667de806c37a6d7f72125117009bd618e32a"
dependencies = [
"as_variant",
"base64",
@ -2544,8 +2543,8 @@ dependencies = [
[[package]]
name = "ruma-events"
version = "0.30.2"
source = "git+https://gitlab.computer.surgery/matrix/ruma.git?rev=ruma-0.12.2%2Bgrapevine-1#4208e8c4c8c2b0e7686aefcdbebf7f2f1d08ee29"
version = "0.30.1"
source = "git+https://github.com/ruma/ruma.git?rev=1387667de806c37a6d7f72125117009bd618e32a#1387667de806c37a6d7f72125117009bd618e32a"
dependencies = [
"as_variant",
"indexmap 2.10.0",
@ -2567,11 +2566,13 @@ dependencies = [
[[package]]
name = "ruma-federation-api"
version = "0.11.1"
source = "git+https://gitlab.computer.surgery/matrix/ruma.git?rev=ruma-0.12.2%2Bgrapevine-1#4208e8c4c8c2b0e7686aefcdbebf7f2f1d08ee29"
version = "0.11.0"
source = "git+https://github.com/ruma/ruma.git?rev=1387667de806c37a6d7f72125117009bd618e32a#1387667de806c37a6d7f72125117009bd618e32a"
dependencies = [
"bytes",
"headers",
"http",
"http-auth",
"httparse",
"js_int",
"memchr",
@ -2581,12 +2582,14 @@ dependencies = [
"ruma-events",
"serde",
"serde_json",
"thiserror 2.0.12",
"tracing",
]
[[package]]
name = "ruma-identifiers-validation"
version = "0.10.1"
source = "git+https://gitlab.computer.surgery/matrix/ruma.git?rev=ruma-0.12.2%2Bgrapevine-1#4208e8c4c8c2b0e7686aefcdbebf7f2f1d08ee29"
source = "git+https://github.com/ruma/ruma.git?rev=1387667de806c37a6d7f72125117009bd618e32a#1387667de806c37a6d7f72125117009bd618e32a"
dependencies = [
"js_int",
"thiserror 2.0.12",
@ -2595,7 +2598,7 @@ dependencies = [
[[package]]
name = "ruma-macros"
version = "0.15.1"
source = "git+https://gitlab.computer.surgery/matrix/ruma.git?rev=ruma-0.12.2%2Bgrapevine-1#4208e8c4c8c2b0e7686aefcdbebf7f2f1d08ee29"
source = "git+https://github.com/ruma/ruma.git?rev=1387667de806c37a6d7f72125117009bd618e32a#1387667de806c37a6d7f72125117009bd618e32a"
dependencies = [
"cfg-if",
"proc-macro-crate",
@ -2610,7 +2613,7 @@ dependencies = [
[[package]]
name = "ruma-push-gateway-api"
version = "0.11.0"
source = "git+https://gitlab.computer.surgery/matrix/ruma.git?rev=ruma-0.12.2%2Bgrapevine-1#4208e8c4c8c2b0e7686aefcdbebf7f2f1d08ee29"
source = "git+https://github.com/ruma/ruma.git?rev=1387667de806c37a6d7f72125117009bd618e32a#1387667de806c37a6d7f72125117009bd618e32a"
dependencies = [
"js_int",
"ruma-common",
@ -2619,23 +2622,10 @@ dependencies = [
"serde_json",
]
[[package]]
name = "ruma-server-util"
version = "0.5.0"
source = "git+https://gitlab.computer.surgery/matrix/ruma.git?rev=ruma-0.12.2%2Bgrapevine-1#4208e8c4c8c2b0e7686aefcdbebf7f2f1d08ee29"
dependencies = [
"headers",
"http",
"http-auth",
"ruma-common",
"thiserror 2.0.12",
"tracing",
]
[[package]]
name = "ruma-signatures"
version = "0.17.1"
source = "git+https://gitlab.computer.surgery/matrix/ruma.git?rev=ruma-0.12.2%2Bgrapevine-1#4208e8c4c8c2b0e7686aefcdbebf7f2f1d08ee29"
version = "0.17.0"
source = "git+https://github.com/ruma/ruma.git?rev=1387667de806c37a6d7f72125117009bd618e32a#1387667de806c37a6d7f72125117009bd618e32a"
dependencies = [
"base64",
"ed25519-dalek",
@ -2651,7 +2641,7 @@ dependencies = [
[[package]]
name = "ruma-state-res"
version = "0.13.0"
source = "git+https://gitlab.computer.surgery/matrix/ruma.git?rev=ruma-0.12.2%2Bgrapevine-1#4208e8c4c8c2b0e7686aefcdbebf7f2f1d08ee29"
source = "git+https://github.com/ruma/ruma.git?rev=1387667de806c37a6d7f72125117009bd618e32a#1387667de806c37a6d7f72125117009bd618e32a"
dependencies = [
"js_int",
"ruma-common",

View file

@ -144,20 +144,27 @@ trust-dns-resolver = "0.23.2"
xdg = "2.5.2"
[dependencies.ruma]
git = "https://gitlab.computer.surgery/matrix/ruma.git"
rev = "ruma-0.12.2+grapevine-1"
git = "https://github.com/ruma/ruma.git"
rev = "1387667de806c37a6d7f72125117009bd618e32a"
features = [
"compat",
"compat-server-signing-key-version",
"compat-empty-string-null",
"compat-null",
"compat-optional",
"compat-unset-avatar",
"compat-get-3pids",
"compat-signature-id",
"compat-tag-info",
"compat-optional-txn-pdus",
"rand",
"appservice-api-c",
"client-api",
"federation-api",
"push-gateway-api-c",
"server-util",
"state-res",
"unstable-msc2448",
"ring-compat",
"unstable-unspecified",
]
[target.'cfg(unix)'.dependencies]

View file

@ -17,10 +17,9 @@ use http::{Request, StatusCode};
use http_body_util::BodyExt;
use ruma::{
api::{
client::error::ErrorKind, AuthScheme, IncomingRequest, Metadata,
OutgoingResponse,
client::error::ErrorKind, federation::authentication::XMatrix,
AuthScheme, IncomingRequest, Metadata, OutgoingResponse,
},
server_util::authorization::XMatrix,
CanonicalJsonValue, MilliSecondsSinceUnixEpoch, OwnedDeviceId,
OwnedServerName, OwnedUserId, UserId,
};
@ -162,6 +161,7 @@ async fn ar_from_request_inner(
(
AuthScheme::None
| AuthScheme::AppserviceToken
| AuthScheme::AppserviceTokenOptional
| AuthScheme::AccessTokenOptional,
Token::Appservice(info),
) => (None, None, None, Some(*info)),
@ -329,6 +329,7 @@ async fn ar_from_request_inner(
(
AuthScheme::None
| AuthScheme::AppserviceToken
| AuthScheme::AppserviceTokenOptional
| AuthScheme::AccessTokenOptional,
Token::None,
) => (None, None, None, None),
@ -341,7 +342,11 @@ async fn ar_from_request_inner(
"Only server signatures should be used on this endpoint.",
));
}
(AuthScheme::AppserviceToken, Token::User(_)) => {
(
AuthScheme::AppserviceToken
| AuthScheme::AppserviceTokenOptional,
Token::User(_),
) => {
return Err(Error::BadRequest(
ErrorKind::Unauthorized,
"Only appservice access tokens should be used on this \

View file

@ -16,6 +16,7 @@ use ruma::{
client::error::{Error as RumaError, ErrorKind},
federation::{
authenticated_media,
authentication::XMatrix,
authorization::get_event_authorization,
backfill::get_backfill,
device::get_devices::{self, v1::UserDevice},
@ -53,7 +54,6 @@ use ruma::{
StateEventType, TimelineEventType,
},
serde::{Base64, JsonObject, Raw},
server_util::authorization::XMatrix,
state_res::Event,
to_device::DeviceIdOrAllDevices,
uint, user_id, CanonicalJsonObject, CanonicalJsonValue, EventId,