完善超级管理员恢复域名配置
Security Checks / security (push) Waiting to run

This commit is contained in:
xuans committed 2026-09-15 22:53:57 +08:00
1 parent bb2477b8b9
commit 56f4abc632
16 files changed
+171 -26

No files matched your search

+16
View File
@@ -191,6 +191,22 @@ func TestValidateSSLMaterialRejectsDomainExpiryAndWeakKeys(t *testing.T) {
}
}
func TestSSLCertificateDomainsIncludesConfiguredAdminRecoveryDomain(t *testing.T) {
domains := SSLCertificateDomains("example.com", "mail.example.com", []string{"example.com"}, "recovery.example.com")
for _, want := range []string{"example.com", "mail.example.com", "recovery.example.com", "smtp.example.com", "imap.example.com", "pop.example.com"} {
found := false
for _, got := range domains {
if got == want {
found = true
break
}
}
if !found {
t.Fatalf("certificate domains %v do not include %q", domains, want)
}
}
}
func TestPrepareCustomSSLPathsKeepsDirectFilesWithoutCopying(t *testing.T) {
root := t.TempDir()
previousRoot := ROOT_PATH