mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
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:
parent
ab5f76f49f
commit
b94cc429b7
4 changed files with 43 additions and 41 deletions
|
|
@ -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 \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue