Release 2.6.2-rc1

This commit is contained in:
2026-10-05 19:35:58 +00:00 Unverified
parent 269675c562
commit 198b7866ef
14 changed files with 699 additions and 113 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ export interface MaintenanceLeaseProvider {
): Promise<{ release(): Promise<void> } | undefined>;
}
/** Accept DNS hostnames only: no URL syntax, port, address literals, or wildcards. */
/** Accept DNS hostnames and an optional leading *. only; no URL syntax, port, or address literals. */
export function normalizeMaintenanceHost(value: unknown): string {
if (typeof value !== "string") throw new Error("host is required");
const host = value.trim().toLowerCase().replace(/\.$/, "");
@@ -35,7 +35,7 @@ export function normalizeMaintenanceHost(value: unknown): string {
host.length === 0 ||
host.length > 253 ||
!host.includes(".") ||
!/^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/.test(host)
!/^(?:\*\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/.test(host)
)
throw new Error("host must be a DNS hostname");
return host;