mirror of
https://github.com/mailscope/kumomta.git
synced 2026-10-22 06:22:26 +00:00
This is a bit esoteric... previously, the http authentication process would essentially short-cut things when a request was made from a trusted host, ignoring any Auth header that may have been present. The rationale was that the host was trusted, so the peer would succeed simply by omitting that header. This commit changes the flow so that we only set the trusted host status if no Auth header was provided. If an Authentication header is present, it will be validated before allowing the request to continue. If the header is invalid then the request will be denied, even if the peer is a trusted host. This tightens things up slightly by making the auth validation behavior most consistent, but it doesn't materially affect the security posture: the trusted host can still successfully make calls by simply omitting the authentication header. It does mean that what was previously allowed (an invalid Auth header from a trusted host) is no longer allowed.