From 647e96dcbaab916c0ad158ee235ec443a4aa2f49 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sun, 9 Jul 2023 15:55:21 +0530 Subject: [PATCH] GeoCountryApp: fixed issue with wildcard records. --- Apps/GeoCountryApp/Address.cs | 2 +- Apps/GeoCountryApp/CNAME.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Apps/GeoCountryApp/Address.cs b/Apps/GeoCountryApp/Address.cs index 37ce8506..d9cb7500 100644 --- a/Apps/GeoCountryApp/Address.cs +++ b/Apps/GeoCountryApp/Address.cs @@ -80,7 +80,7 @@ namespace GeoCountry { DnsQuestionRecord question = request.Question[0]; - if (!question.Name.Equals(appRecordName, StringComparison.OrdinalIgnoreCase)) + if (!question.Name.Equals(appRecordName, StringComparison.OrdinalIgnoreCase) && !appRecordName.StartsWith("*.", StringComparison.OrdinalIgnoreCase)) return Task.FromResult(null); switch (question.Type) diff --git a/Apps/GeoCountryApp/CNAME.cs b/Apps/GeoCountryApp/CNAME.cs index 7df06aca..e28a9ccd 100644 --- a/Apps/GeoCountryApp/CNAME.cs +++ b/Apps/GeoCountryApp/CNAME.cs @@ -78,7 +78,7 @@ namespace GeoCountry { DnsQuestionRecord question = request.Question[0]; - if (!question.Name.Equals(appRecordName, StringComparison.OrdinalIgnoreCase)) + if (!question.Name.Equals(appRecordName, StringComparison.OrdinalIgnoreCase) && !appRecordName.StartsWith("*.", StringComparison.OrdinalIgnoreCase)) return Task.FromResult(null); using JsonDocument jsonDocument = JsonDocument.Parse(appRecordData);