pub fn resolve(
config: &ServerConfig,
headers: &HeaderMap,
) -> Result<Authority, HeaderRejection>the master key is filtered by source address; call resolve_with_peer. This form refuses every master and maintenance key because it has no address to check.
Expand description
The 0.2.0 signature, kept so a patch release does not stop a downstream crate compiling.
It fails closed rather than preserving 0.2.0’s behavior, which is the point: 0.2.0’s
behavior here is the defect. With no peer address there is nothing to check masterKeyIps
against, so the master and maintenance keys are refused and every other request is unaffected.
A caller that wants them to work has to say where the request came from, which is
resolve_with_peer.
Cargo treats 0.2.1 as compatible with 0.2.0 and will upgrade into it without being asked, so
removing this would turn a security patch into a build failure for anyone calling resolve
directly. Keeping it means their build still succeeds and their privileged keys stop working
until they pass an address, which is loud at runtime and safe in the meantime.