Skip to content

Commit

Permalink
fix(command): do not override subject and san of certificate when loa…
Browse files Browse the repository at this point in the history
…ding configuration from file

Signed-off-by: Florentin Dubois <[email protected]>
  • Loading branch information
FlorentinDUBOIS committed May 29, 2024
1 parent 3816cbf commit de0da04
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion command/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,11 @@ impl HttpFrontendConfig {
certificate: self.certificate.clone().unwrap(),
certificate_chain: self.certificate_chain.clone().unwrap_or_default(),
versions: self.tls_versions.iter().map(|v| *v as i32).collect(),
names: vec![self.hostname.clone()],
// This field is used to override the certificate subject and san, we should not set it when
// loading the configuration, as we may provide a wildcard certificate for a specific domain.
// As a result, we will reject legit traffic for others domains as the certificate resolver will
// not load twice the same certificate and then do not register the certificate for others domains.
names: vec![],
},
expired_at: None,
})
Expand Down

0 comments on commit de0da04

Please sign in to comment.