diff --git a/book/changelog.md b/book/changelog.md index 684b1cf6..031a34ae 100644 --- a/book/changelog.md +++ b/book/changelog.md @@ -179,6 +179,8 @@ This will be the first release of Grapevine since it was forked from Conduit that caused us to attempt to fetch our own signing keys from ourselves over federation, and fail ("Won't send federation request to ourselves"). ([!96](https://gitlab.computer.surgery/matrix/grapevine-fork/-/merge_requests/96)) +18. Fixed incoming HTTP/2 requests failing federation signature check. + ([!104](https://gitlab.computer.surgery/matrix/grapevine-fork/-/merge_requests/104)) ### Added diff --git a/src/api/ruma_wrapper/axum.rs b/src/api/ruma_wrapper/axum.rs index 6315e5e1..712386d9 100644 --- a/src/api/ruma_wrapper/axum.rs +++ b/src/api/ruma_wrapper/axum.rs @@ -220,6 +220,16 @@ async fn ar_from_request_inner( CanonicalJsonValue::Object(origin_signatures), )]); + let x_matrix_uri = parts + .uri + .path_and_query() + .ok_or_else(|| { + Error::BadRequest( + ErrorKind::InvalidParam, + "No HTTP path/query", + ) + })? + .to_string(); let mut request_map = BTreeMap::from_iter([ ( "method".to_owned(), @@ -227,7 +237,7 @@ async fn ar_from_request_inner( ), ( "uri".to_owned(), - CanonicalJsonValue::String(parts.uri.to_string()), + CanonicalJsonValue::String(x_matrix_uri), ), ( "origin".to_owned(),