pub enum FilterDenial {
UnsupportedScheme {
scheme: String,
},
MissingHost,
Malformed,
DeniedIpLiteral {
literal: String,
},
DeniedResolvedIp {
ip: IpAddr,
},
UserinfoNotAllowed,
ReservedNamespace {
path: String,
},
}Expand description
A denial with a name a peer can act on.
The discriminant is the class of the refusal, not the value — a peer
cannot recover a Loopback denial by trying a different loopback
address. The string is logged, never parsed.
Variants§
UnsupportedScheme
The URL is not http or https. Push notifications are HTTP POSTs;
any other scheme is either impossible (a transport that does not
exist) or an obvious SSRF primitive (file://, gopher://).
MissingHost
The URL has no host. A URL like http:///path is not a URL the
delivery adapter can resolve.
Malformed
The URL is malformed in a way url::Url::parse did not catch. Almost
never raised; a parse failure is usually an UnsupportedScheme or
MissingHost first.
DeniedIpLiteral
The URL contained an IP literal in a denied range. The string names
the literal, not the resolved IP — check_at_config sees the
literal; check_at_delivery does not re-raise this variant.
DeniedResolvedIp
The resolved IP is in a denied range, even though the URL string may have looked fine. DNS rebinding lands here.
UserinfoNotAllowed
The URL contained a userinfo segment (user:pass@host). The
credential is not a credential the server is honouring, and the
format is a known SSRF primitive in URL parsers that disagree about
what it means.
ReservedNamespace
The URL targeted the version’s per-version well-known path or
another reserved namespace the server owns. A PushNotificationConfig
pointing at the server’s own agent card endpoint is a loopback
primitive the static check would otherwise have to allow.
Trait Implementations§
Source§impl Clone for FilterDenial
impl Clone for FilterDenial
Source§impl Debug for FilterDenial
impl Debug for FilterDenial
Source§impl Display for FilterDenial
impl Display for FilterDenial
impl Eq for FilterDenial
Source§impl Error for FilterDenial
impl Error for FilterDenial
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()