From 3cc3be2d50dad62da5a5fec57e96b1f17ea8f0d2 Mon Sep 17 00:00:00 2001 From: titanism <101466223+titanism@users.noreply.github.com> Date: Wed, 13 Dec 2023 12:37:52 -0600 Subject: [PATCH] :bug: Fixed ipv6 check properly (#232) It appears your rewrite caused this feature to not work. See our comment here . --- src/update.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/update.ts b/src/update.ts index 11dd646d..5cef65a6 100644 --- a/src/update.ts +++ b/src/update.ts @@ -160,12 +160,13 @@ export const update = async (shouldCommit = false) => { if (isIP(url)) { if (site.ipv6 && !isIPv6(url)) throw new Error("Site URL must be IPv6 for ipv6 check"); - else if (site.ipv6) + } else { + if (site.ipv6) address = (await dns.promises.resolve6(url))[0]; else address = (await dns.promises.resolve4(url))[0]; - if (isIP(url) && !isIP(address)) + if (!isIP(address)) throw new Error("Site IP address could not be resolved"); }