The HTTP listener timed only the request head (hyper's 30 seconds). Once a request declared a body, nothing timed reading it, and nothing timed writing the answer. A client that sent "POST /api/x" with a Content-Length and then nothing, or pipelined requests and never read the answers, held its connection for as long as the TCP connection lived, at no cost in rate limit or fail2ban. Every listener allows 8,192 connections, so one unauthenticated address could fill them all and lock everyone out of JMAP, WebDAV, OAuth sign-in, autoconfig and the admin API until it let go. Now a request body that sends nothing for 60 seconds is given up, and the request fails. A write to the client that makes no progress for 60 seconds ends the connection. Both count from the last progress, so a slow upload or download that keeps moving, an event stream and an idle WebSocket are not affected. Found in a security review. Test: in crates/http, over a connection served as the listener serves it, a POST that declared 1,000,000 body bytes and sent 3 got no answer after 120 seconds, and a client that never read a 1 MiB answer kept its connection after 120 seconds. Now the first gets 408 from the test's handler and the second connection ends with an error, both within the 120 seconds.
55 lines
1.6 KiB
TOML
55 lines
1.6 KiB
TOML
[package]
|
|
name = "http"
|
|
version = "0.16.27"
|
|
edition = "2024"
|
|
|
|
[dependencies]
|
|
store = { path = "../store" }
|
|
common = { path = "../common" }
|
|
utils = { path = "../utils" }
|
|
trc = { path = "../trc" }
|
|
email = { path = "../email" }
|
|
smtp = { path = "../smtp" }
|
|
jmap = { path = "../jmap" }
|
|
dav = { path = "../dav" }
|
|
scim = { path = "../scim" }
|
|
scim-proto = { path = "../scim-proto" }
|
|
groupware = { path = "../groupware" }
|
|
http_proto = { path = "../http-proto" }
|
|
jmap_proto = { path = "../jmap-proto" }
|
|
types = { path = "../types" }
|
|
directory = { path = "../directory" }
|
|
services = { path = "../services" }
|
|
registry = { path = "../registry" }
|
|
mail-parser = { version = "0.11", features = ["full_encoding", "rkyv"] }
|
|
mail-builder = { version = "1.0" }
|
|
mail-auth = { version = "0.13", features = ["generate", "arc"] }
|
|
tokio = { version = "1.53", features = ["rt"] }
|
|
hyper = { version = "1.11.1", features = ["server", "http1", "http2"] }
|
|
inbuxa-features = { path = "../features" }
|
|
hyper-util = { version = "0.1.20", features = ["tokio"] }
|
|
http-body-util = "0.1.5"
|
|
async-stream = "0.3.6"
|
|
serde = { version = "1.0", features = ["derive"]}
|
|
serde_json = "1.0"
|
|
chrono = "0.4"
|
|
base64 = "0.23"
|
|
sha2 = "0.11"
|
|
rkyv = { version = "0.8.18", features = ["little_endian"] }
|
|
form-data = { version = "0.6.0", features = ["sync"], default-features = false }
|
|
mime = "0.3.17"
|
|
percent-encoding = "2.3.2"
|
|
hashify = { version = "0.2" }
|
|
|
|
[dev-dependencies]
|
|
flate2 = "1.1"
|
|
tokio = { version = "1.53", features = ["rt", "macros", "time", "test-util", "io-util"] }
|
|
|
|
[features]
|
|
test_mode = []
|
|
dev_mode = []
|
|
enterprise = ["scim/enterprise"]
|
|
|
|
[lints]
|
|
workspace = true
|