From 8db36166ee5a051983025c3311ebb654e5c2e5d9 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sun, 24 Mar 2024 13:20:28 -0700 Subject: [PATCH] Use the correct case for firewall attribute values --- .../TestData/UsingFirewall/PackageComponents.wxs | 6 +++--- src/ext/Firewall/wixext/FirewallCompiler.cs | 10 ++++++++-- .../FirewallExtensionTests/ScopeRules/product.wxs | 6 +++--- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/ext/Firewall/test/WixToolsetTest.Firewall/TestData/UsingFirewall/PackageComponents.wxs b/src/ext/Firewall/test/WixToolsetTest.Firewall/TestData/UsingFirewall/PackageComponents.wxs index b9ba0aa42..08802a866 100644 --- a/src/ext/Firewall/test/WixToolsetTest.Firewall/TestData/UsingFirewall/PackageComponents.wxs +++ b/src/ext/Firewall/test/WixToolsetTest.Firewall/TestData/UsingFirewall/PackageComponents.wxs @@ -12,9 +12,9 @@ - - - + + + diff --git a/src/ext/Firewall/wixext/FirewallCompiler.cs b/src/ext/Firewall/wixext/FirewallCompiler.cs index 7db1dcc4e..013d15bc8 100644 --- a/src/ext/Firewall/wixext/FirewallCompiler.cs +++ b/src/ext/Firewall/wixext/FirewallCompiler.cs @@ -227,12 +227,15 @@ private void ParseFirewallExceptionElement(Intermediate intermediate, Intermedia remoteAddresses = "LocalSubnet"; break; case "DNS": + case "dns": remoteAddresses = "dns"; break; case "DHCP": + case "dhcp": remoteAddresses = "dhcp"; break; case "WINS": + case "wins": remoteAddresses = "wins"; break; case "defaultGateway": @@ -242,7 +245,7 @@ private void ParseFirewallExceptionElement(Intermediate intermediate, Intermedia remoteAddresses = scope; if (!this.ParseHelper.ContainsProperty(scope)) { - this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "Scope", scope, "any", "localSubnet", "DNS", "DHCP", "WINS", "defaultGateway")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "Scope", scope, "any", "localSubnet", "dns", "dhcp", "wins", "defaultGateway")); } break; } @@ -384,12 +387,15 @@ private void ParseFirewallExceptionElement(Intermediate intermediate, Intermedia localAddresses = "LocalSubnet"; break; case "DNS": + case "dns": localAddresses = "dns"; break; case "DHCP": + case "dhcp": localAddresses = "dhcp"; break; case "WINS": + case "wins": localAddresses = "wins"; break; case "defaultGateway": @@ -399,7 +405,7 @@ private void ParseFirewallExceptionElement(Intermediate intermediate, Intermedia default: if (!this.ParseHelper.ContainsProperty(localScope)) { - this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "LocalScope", localScope, "any", "localSubnet", "DNS", "DHCP", "WINS", "defaultGateway")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "LocalScope", localScope, "any", "localSubnet", "dns", "dhcp", "wins", "defaultGateway")); } else { diff --git a/src/test/msi/TestData/FirewallExtensionTests/ScopeRules/product.wxs b/src/test/msi/TestData/FirewallExtensionTests/ScopeRules/product.wxs index 776c86750..25d29f9fc 100644 --- a/src/test/msi/TestData/FirewallExtensionTests/ScopeRules/product.wxs +++ b/src/test/msi/TestData/FirewallExtensionTests/ScopeRules/product.wxs @@ -18,13 +18,13 @@ Name="WiXToolset401 Test - 0013" Scope="localSubnet" Port="1300" /> + Name="WiXToolset401 Test - 0014" Scope="dns" Port="1400" /> + Name="WiXToolset401 Test - 0015" Scope="dhcp" Port="1500" /> + Name="WiXToolset401 Test - 0016" Scope="wins" Port="1600" />