diff --git a/DnsServerCore/WebServiceDashboardApi.cs b/DnsServerCore/WebServiceDashboardApi.cs index e7522346..130abd97 100644 --- a/DnsServerCore/WebServiceDashboardApi.cs +++ b/DnsServerCore/WebServiceDashboardApi.cs @@ -141,7 +141,7 @@ namespace DnsServerCore Dictionary>> data; string labelFormat; - switch (strType.ToLower()) + switch (strType.ToLowerInvariant()) { case "lasthour": data = _dnsWebService.DnsServer.StatsManager.GetLastHourMinuteWiseStats(utcFormat); @@ -569,7 +569,7 @@ namespace DnsServerCore List> topStatsData; - switch (strType.ToLower()) + switch (strType.ToLowerInvariant()) { case "lasthour": topStatsData = _dnsWebService.DnsServer.StatsManager.GetLastHourTopStats(statsType, limit); diff --git a/DnsServerCore/WebServiceOtherZonesApi.cs b/DnsServerCore/WebServiceOtherZonesApi.cs index 28939c56..57e3c30e 100644 --- a/DnsServerCore/WebServiceOtherZonesApi.cs +++ b/DnsServerCore/WebServiceOtherZonesApi.cs @@ -1,6 +1,6 @@ /* Technitium DNS Server -Copyright (C) 2023 Shreyas Zare (shreyas@technitium.com) +Copyright (C) 2024 Shreyas Zare (shreyas@technitium.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,7 +20,6 @@ along with this program. If not, see . using DnsServerCore.Auth; using DnsServerCore.Dns.Zones; using Microsoft.AspNetCore.Http; -using System; using System.Collections.Generic; using System.IO; using System.Net; @@ -81,7 +80,7 @@ namespace DnsServerCore string direction = request.QueryOrForm("direction"); if (direction is not null) - direction = direction.ToLower(); + direction = direction.ToLowerInvariant(); List subZones = new List(); List records = new List(); @@ -187,7 +186,7 @@ namespace DnsServerCore string direction = request.QueryOrForm("direction"); if (direction is not null) - direction = direction.ToLower(); + direction = direction.ToLowerInvariant(); List subZones = new List(); List records = new List(); @@ -376,7 +375,7 @@ namespace DnsServerCore string direction = request.QueryOrForm("direction"); if (direction is not null) - direction = direction.ToLower(); + direction = direction.ToLowerInvariant(); List subZones = new List(); List records = new List();