fix: Do not include faulty link-local DNS records in the list of found records
continuous-integration/drone/push Build is passing Details

pull/475/head
Inex Code 2024-03-04 01:31:27 +03:00
parent 60c6736487
commit 67bcbe419f
1 changed files with 4 additions and 1 deletions

View File

@ -93,6 +93,10 @@ class DnsRecordsCubit extends ServerConnectionDependentCubit<DnsRecordsState> {
final List<DesiredDnsRecord> foundRecords = [];
try {
for (final DnsRecord pendingDnsRecord in pendingDnsRecords) {
if (pendingDnsRecord.type == 'AAAA' &&
(pendingDnsRecord.content?.startsWith('fe80::') ?? false)) {
continue;
}
if (pendingDnsRecord.name == 'selector._domainkey') {
final foundRecord = providerDnsRecords.firstWhere(
(final r) =>
@ -207,7 +211,6 @@ class DnsRecordsCubit extends ServerConnectionDependentCubit<DnsRecordsState> {
records.addAll(recordsToAdd);
}
/// TODO: Error handling?
final ServerDomain? domain = getIt<ApiConnectionRepository>().serverDomain;
await ProvidersController.currentDnsProvider!.removeDomainRecords(