fix(transfer): resolve IPv6-only server host names

The domain check of the transfer checklist resolved the server host name
with gethostbynamel(), which returns IPv4 only, so a domain that points to
an IPv6-only server was reported as pointing to another address. Resolve A
and AAAA records and compare normalized addresses. The Cloud SSH probe now
also resolves AAAA records when a host name has no A record.

Closes #12397

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai
2026-11-02 14:46:19 +01:00
co-authored by Claude Opus 5.5
parent 8dea526098
commit bc855fdc68
2 changed files with 19 additions and 4 deletions
@@ -232,7 +232,7 @@ class ServerTransferController extends Controller
Server::throttleValidation($teamId, $ip);
$probeIp = Server::normalizeIp($ip);
if (isCloud() && ! filter_var($probeIp, FILTER_VALIDATE_IP)) {
$probeIp = gethostbyname($probeIp);
$probeIp = resolveHostToIp($probeIp);
}
$probeHost = filter_var($probeIp, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) ? "[{$probeIp}]" : $probeIp;
$probeAllowed = ! isCloud() || (filter_var($probeIp, FILTER_VALIDATE_IP)