Compare commits
2 commits
main
...
renovate/a
Author | SHA1 | Date | |
---|---|---|---|
ebda78f83e | |||
|
7ea50c9d8e |
3 changed files with 16 additions and 80 deletions
87
Cargo.lock
generated
87
Cargo.lock
generated
|
@ -159,7 +159,7 @@ name = "artifactview"
|
|||
version = "0.4.7"
|
||||
dependencies = [
|
||||
"async_zip",
|
||||
"axum 0.7.9",
|
||||
"axum",
|
||||
"axum-extra",
|
||||
"axum-test",
|
||||
"comrak",
|
||||
|
@ -235,17 +235,6 @@ dependencies = [
|
|||
"zstd-safe",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-trait"
|
||||
version = "0.1.81"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.87",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async_zip"
|
||||
version = "0.0.17"
|
||||
|
@ -282,13 +271,13 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
|
|||
|
||||
[[package]]
|
||||
name = "axum"
|
||||
version = "0.7.9"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f"
|
||||
checksum = "6d6fd624c75e18b3b4c6b9caf42b1afe24437daaee904069137d8bab077be8b8"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"axum-core 0.4.5",
|
||||
"axum-core",
|
||||
"bytes",
|
||||
"form_urlencoded",
|
||||
"futures-util",
|
||||
"http 1.2.0",
|
||||
"http-body",
|
||||
|
@ -296,7 +285,7 @@ dependencies = [
|
|||
"hyper",
|
||||
"hyper-util",
|
||||
"itoa",
|
||||
"matchit 0.7.3",
|
||||
"matchit",
|
||||
"memchr",
|
||||
"mime",
|
||||
"percent-encoding",
|
||||
|
@ -314,54 +303,6 @@ dependencies = [
|
|||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "axum"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d6fd624c75e18b3b4c6b9caf42b1afe24437daaee904069137d8bab077be8b8"
|
||||
dependencies = [
|
||||
"axum-core 0.5.0",
|
||||
"bytes",
|
||||
"futures-util",
|
||||
"http 1.2.0",
|
||||
"http-body",
|
||||
"http-body-util",
|
||||
"itoa",
|
||||
"matchit 0.8.4",
|
||||
"memchr",
|
||||
"mime",
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"rustversion",
|
||||
"serde",
|
||||
"sync_wrapper",
|
||||
"tower",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "axum-core"
|
||||
version = "0.4.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bytes",
|
||||
"futures-util",
|
||||
"http 1.2.0",
|
||||
"http-body",
|
||||
"http-body-util",
|
||||
"mime",
|
||||
"pin-project-lite",
|
||||
"rustversion",
|
||||
"sync_wrapper",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "axum-core"
|
||||
version = "0.5.0"
|
||||
|
@ -388,8 +329,8 @@ version = "0.10.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "460fc6f625a1f7705c6cf62d0d070794e94668988b1c38111baeec177c715f7b"
|
||||
dependencies = [
|
||||
"axum 0.8.1",
|
||||
"axum-core 0.5.0",
|
||||
"axum",
|
||||
"axum-core",
|
||||
"bytes",
|
||||
"futures-util",
|
||||
"headers",
|
||||
|
@ -406,14 +347,14 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "axum-test"
|
||||
version = "16.4.1"
|
||||
version = "17.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "63e3a443d2608936a02a222da7b746eb412fede7225b3030b64fe9be99eab8dc"
|
||||
checksum = "375ec4f6db373ce6d696839249203c57049aefe1213cfa77bb2e12e10ed43d08"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"assert-json-diff",
|
||||
"auto-future",
|
||||
"axum 0.7.9",
|
||||
"axum",
|
||||
"bytes",
|
||||
"bytesize",
|
||||
"cookie",
|
||||
|
@ -1697,12 +1638,6 @@ dependencies = [
|
|||
"tendril",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "matchit"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
|
||||
|
||||
[[package]]
|
||||
name = "matchit"
|
||||
version = "0.8.4"
|
||||
|
|
|
@ -21,7 +21,7 @@ async_zip = { path = "crates/async_zip", features = [
|
|||
"tokio-fs",
|
||||
"deflate",
|
||||
] }
|
||||
axum = { version = "0.7.5", default-features = false, features = [
|
||||
axum = { version = "0.8.0", default-features = false, features = [
|
||||
"http1",
|
||||
"http2",
|
||||
"json",
|
||||
|
@ -80,7 +80,7 @@ yarte = { version = "0.15.7", features = ["json"] }
|
|||
yarte_helpers = "0.15.8"
|
||||
|
||||
[dev-dependencies]
|
||||
axum-test = "16.0.0"
|
||||
axum-test = "17.0.0"
|
||||
flate2 = "1.0.30"
|
||||
httpdate = "1.0.3"
|
||||
insta = { version = "1.39.0", features = ["json"] }
|
||||
|
|
|
@ -11,12 +11,13 @@ use std::{
|
|||
use async_zip::tokio::read::ZipEntryReader;
|
||||
use axum::{
|
||||
body::Body,
|
||||
extract::{Host, Query as XQuery, Request, State},
|
||||
extract::{Query as XQuery, Request, State},
|
||||
http::{Response, Uri},
|
||||
response::{IntoResponse, Redirect},
|
||||
routing::{any, get, post},
|
||||
Json, RequestExt, Router,
|
||||
};
|
||||
use axum_extra::extract::Host;
|
||||
use futures_lite::AsyncReadExt as LiteAsyncReadExt;
|
||||
use governor::{Quota, RateLimiter};
|
||||
use headers::{ContentType, HeaderMapExt};
|
||||
|
@ -175,7 +176,7 @@ impl App {
|
|||
.route("/.well-known/api/prComment", post(Self::pr_comment))
|
||||
// Prevent access to the .well-known folder since it enables abuse
|
||||
// (e.g. SSL certificate registration by an attacker)
|
||||
.route("/.well-known/*path", any(|| async { Error::Inaccessible }))
|
||||
.route("/.well-known/{*path}", any(|| async { Error::Inaccessible }))
|
||||
// Serve artifact pages
|
||||
.route("/", get(Self::get_page))
|
||||
.fallback(get(Self::get_page))
|
||||
|
|
Loading…
Add table
Reference in a new issue