Allow .test domains during bootstrap

This commit is contained in:
Maurus Decimus
2026-04-23 18:09:33 +02:00
parent 5e87009ca1
commit a074e237d1

View File

@@ -121,7 +121,7 @@ pub(crate) async fn bootstrap_set(
// Validate domain name and hostname // Validate domain name and hostname
let server_hostname = bootstrap.server_hostname.trim().to_lowercase(); let server_hostname = bootstrap.server_hostname.trim().to_lowercase();
let domain_name = bootstrap.default_domain.trim().to_lowercase(); let domain_name = bootstrap.default_domain.trim().to_lowercase();
if psl::domain_str(&server_hostname).is_none() { if psl::domain_str(&server_hostname).is_none() && !server_hostname.ends_with(".test") {
set.response.not_updated.append( set.response.not_updated.append(
id, id,
SetError::invalid_properties() SetError::invalid_properties()
@@ -130,7 +130,7 @@ pub(crate) async fn bootstrap_set(
); );
break; break;
} }
if psl::domain_str(&domain_name).is_none() { if psl::domain_str(&domain_name).is_none() && !domain_name.ends_with(".test") {
set.response.not_updated.append( set.response.not_updated.append(
id, id,
SetError::invalid_properties() SetError::invalid_properties()