mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
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:
co-authored by
Claude Opus 5.5
parent
8dea526098
commit
bc855fdc68
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user