diff options
author | Bob Arnson <bob@firegiant.com> | 2024-09-27 22:09:24 -0400 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2024-12-26 21:46:38 -0800 |
commit | aa2678906191e0535fad5634467f074aae049c09 (patch) | |
tree | d4b4d03a313d12dac0f4ee7f81b1945b1293691e /src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs | |
parent | 3986a0b375d5b536f897d6284770baf711afaf86 (diff) | |
download | wix-aa2678906191e0535fad5634467f074aae049c09.tar.gz wix-aa2678906191e0535fad5634467f074aae049c09.tar.bz2 wix-aa2678906191e0535fad5634467f074aae049c09.zip |
Drop CA path validation in WixUI by default.
Add `WixUI/ExtendedPathValidation="yes"` to opt-in.
Removed the WIXUI_DONTVALIDATEPATH runtime opt-out.
Fixes https://github.com/wixtoolset/issues/issues/8718
Relies on https://github.com/wixtoolset/wix/pull/563
Diffstat (limited to 'src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs')
-rw-r--r-- | src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs | 46 |
1 files changed, 10 insertions, 36 deletions
diff --git a/src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs b/src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs index eb5e3687..bb20f087 100644 --- a/src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs +++ b/src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs | |||
@@ -29,7 +29,6 @@ namespace WixToolsetTest.UI | |||
29 | "Binary:WixUI_Bmp_Up\t[Binary data]", | 29 | "Binary:WixUI_Bmp_Up\t[Binary data]", |
30 | "Binary:WixUI_Ico_Exclam\t[Binary data]", | 30 | "Binary:WixUI_Ico_Exclam\t[Binary data]", |
31 | "Binary:WixUI_Ico_Info\t[Binary data]", | 31 | "Binary:WixUI_Ico_Info\t[Binary data]", |
32 | "Binary:WixUiCa_X86\t[Binary data]", | ||
33 | }, results.Where(r => r.StartsWith("Binary:")).ToArray()); | 32 | }, results.Where(r => r.StartsWith("Binary:")).ToArray()); |
34 | WixAssert.CompareLineByLine(new[] | 33 | WixAssert.CompareLineByLine(new[] |
35 | { | 34 | { |
@@ -37,13 +36,8 @@ namespace WixToolsetTest.UI | |||
37 | "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t", | 36 | "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t", |
38 | "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t", | 37 | "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t", |
39 | "CustomAction:WixSetPerUserFolder\t51\tAPPLICATIONFOLDER\t[WixPerUserFolder]\t", | 38 | "CustomAction:WixSetPerUserFolder\t51\tAPPLICATIONFOLDER\t[WixPerUserFolder]\t", |
40 | "CustomAction:WixUIValidatePath_X86\t65\tWixUiCa_X86\tValidatePath\t", | ||
41 | }, results.Where(r => r.StartsWith("CustomAction:")).ToArray()); | 39 | }, results.Where(r => r.StartsWith("CustomAction:")).ToArray()); |
42 | WixAssert.CompareLineByLine(new[] | 40 | Assert.Empty(results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).ToArray()); |
43 | { | ||
44 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_X86\tNOT WIXUI_DONTVALIDATEPATH\t1", | ||
45 | "ControlEvent:InstallDirDlg\tNext\tDoAction\tWixUIValidatePath_X86\tNOT WIXUI_DONTVALIDATEPATH\t2", | ||
46 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).ToArray()); | ||
47 | WixAssert.CompareLineByLine(new[] | 41 | WixAssert.CompareLineByLine(new[] |
48 | { | 42 | { |
49 | "InstallUISequence:AdvancedWelcomeEulaDlg\tNOT Installed\t1297", | 43 | "InstallUISequence:AdvancedWelcomeEulaDlg\tNOT Installed\t1297", |
@@ -68,7 +62,6 @@ namespace WixToolsetTest.UI | |||
68 | "Binary:WixUI_Bmp_Up\t[Binary data]", | 62 | "Binary:WixUI_Bmp_Up\t[Binary data]", |
69 | "Binary:WixUI_Ico_Exclam\t[Binary data]", | 63 | "Binary:WixUI_Ico_Exclam\t[Binary data]", |
70 | "Binary:WixUI_Ico_Info\t[Binary data]", | 64 | "Binary:WixUI_Ico_Info\t[Binary data]", |
71 | "Binary:WixUiCa_X64\t[Binary data]", | ||
72 | }, results.Where(r => r.StartsWith("Binary:")).ToArray()); | 65 | }, results.Where(r => r.StartsWith("Binary:")).ToArray()); |
73 | WixAssert.CompareLineByLine(new[] | 66 | WixAssert.CompareLineByLine(new[] |
74 | { | 67 | { |
@@ -76,13 +69,8 @@ namespace WixToolsetTest.UI | |||
76 | "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t", | 69 | "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t", |
77 | "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t", | 70 | "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t", |
78 | "CustomAction:WixSetPerUserFolder\t51\tAPPLICATIONFOLDER\t[WixPerUserFolder]\t", | 71 | "CustomAction:WixSetPerUserFolder\t51\tAPPLICATIONFOLDER\t[WixPerUserFolder]\t", |
79 | "CustomAction:WixUIValidatePath_X64\t65\tWixUiCa_X64\tValidatePath\t", | ||
80 | }, results.Where(r => r.StartsWith("CustomAction:")).ToArray()); | 72 | }, results.Where(r => r.StartsWith("CustomAction:")).ToArray()); |
81 | WixAssert.CompareLineByLine(new[] | 73 | Assert.Empty(results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).ToArray()); |
82 | { | ||
83 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_X64\tNOT WIXUI_DONTVALIDATEPATH\t1", | ||
84 | "ControlEvent:InstallDirDlg\tNext\tDoAction\tWixUIValidatePath_X64\tNOT WIXUI_DONTVALIDATEPATH\t2", | ||
85 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).ToArray()); | ||
86 | } | 74 | } |
87 | 75 | ||
88 | [Fact] | 76 | [Fact] |
@@ -102,7 +90,6 @@ namespace WixToolsetTest.UI | |||
102 | "Binary:WixUI_Bmp_Up\t[Binary data]", | 90 | "Binary:WixUI_Bmp_Up\t[Binary data]", |
103 | "Binary:WixUI_Ico_Exclam\t[Binary data]", | 91 | "Binary:WixUI_Ico_Exclam\t[Binary data]", |
104 | "Binary:WixUI_Ico_Info\t[Binary data]", | 92 | "Binary:WixUI_Ico_Info\t[Binary data]", |
105 | "Binary:WixUiCa_A64\t[Binary data]", | ||
106 | }, results.Where(r => r.StartsWith("Binary:")).ToArray()); | 93 | }, results.Where(r => r.StartsWith("Binary:")).ToArray()); |
107 | WixAssert.CompareLineByLine(new[] | 94 | WixAssert.CompareLineByLine(new[] |
108 | { | 95 | { |
@@ -110,13 +97,8 @@ namespace WixToolsetTest.UI | |||
110 | "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t", | 97 | "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t", |
111 | "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t", | 98 | "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t", |
112 | "CustomAction:WixSetPerUserFolder\t51\tAPPLICATIONFOLDER\t[WixPerUserFolder]\t", | 99 | "CustomAction:WixSetPerUserFolder\t51\tAPPLICATIONFOLDER\t[WixPerUserFolder]\t", |
113 | "CustomAction:WixUIValidatePath_A64\t65\tWixUiCa_A64\tValidatePath\t", | ||
114 | }, results.Where(r => r.StartsWith("CustomAction:")).ToArray()); | 100 | }, results.Where(r => r.StartsWith("CustomAction:")).ToArray()); |
115 | WixAssert.CompareLineByLine(new[] | 101 | Assert.Empty(results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).ToArray()); |
116 | { | ||
117 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_A64\tNOT WIXUI_DONTVALIDATEPATH\t1", | ||
118 | "ControlEvent:InstallDirDlg\tNext\tDoAction\tWixUIValidatePath_A64\tNOT WIXUI_DONTVALIDATEPATH\t2", | ||
119 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).ToArray()); | ||
120 | } | 102 | } |
121 | 103 | ||
122 | [Fact] | 104 | [Fact] |
@@ -180,8 +162,8 @@ namespace WixToolsetTest.UI | |||
180 | }, results.Where(r => r.StartsWith("Property:WIXUI")).ToArray()); | 162 | }, results.Where(r => r.StartsWith("Property:WIXUI")).ToArray()); |
181 | WixAssert.CompareLineByLine(new[] | 163 | WixAssert.CompareLineByLine(new[] |
182 | { | 164 | { |
183 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_X86\tNOT WIXUI_DONTVALIDATEPATH\t3", | 165 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_X86\t1\t1", |
184 | "ControlEvent:InstallDirDlg\tNext\tDoAction\tWixUIValidatePath_X86\tNOT WIXUI_DONTVALIDATEPATH\t2", | 166 | "ControlEvent:InstallDirDlg\tNext\tDoAction\tWixUIValidatePath_X86\t1\t1", |
185 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).OrderBy(s => s).ToArray()); | 167 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).OrderBy(s => s).ToArray()); |
186 | WixAssert.CompareLineByLine(new[] | 168 | WixAssert.CompareLineByLine(new[] |
187 | { | 169 | { |
@@ -281,7 +263,7 @@ namespace WixToolsetTest.UI | |||
281 | }, results.Where(r => r.StartsWith("CustomAction:")).ToArray()); | 263 | }, results.Where(r => r.StartsWith("CustomAction:")).ToArray()); |
282 | WixAssert.CompareLineByLine(new[] | 264 | WixAssert.CompareLineByLine(new[] |
283 | { | 265 | { |
284 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_X86\tNOT WIXUI_DONTVALIDATEPATH\t3", | 266 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_X86\t1\t1", |
285 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).ToArray()); | 267 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).ToArray()); |
286 | WixAssert.CompareLineByLine(new[] | 268 | WixAssert.CompareLineByLine(new[] |
287 | { | 269 | { |
@@ -332,8 +314,8 @@ namespace WixToolsetTest.UI | |||
332 | }, results.Where(r => r.StartsWith("Property:WIXUI")).ToArray()); | 314 | }, results.Where(r => r.StartsWith("Property:WIXUI")).ToArray()); |
333 | WixAssert.CompareLineByLine(new[] | 315 | WixAssert.CompareLineByLine(new[] |
334 | { | 316 | { |
335 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_X86\tNOT WIXUI_DONTVALIDATEPATH\t3", | 317 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_X86\t1\t3", |
336 | "ControlEvent:InstallDirDlg\tNext\tDoAction\tWixUIValidatePath_X86\tNOT WIXUI_DONTVALIDATEPATH\t2", | 318 | "ControlEvent:InstallDirDlg\tNext\tDoAction\tWixUIValidatePath_X86\t1\t2", |
337 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).OrderBy(s => s).ToArray()); | 319 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).OrderBy(s => s).ToArray()); |
338 | 320 | ||
339 | Assert.Empty(results.Where(result => result.Contains("LicenseAgreementDlg")).ToArray()); | 321 | Assert.Empty(results.Where(result => result.Contains("LicenseAgreementDlg")).ToArray()); |
@@ -361,21 +343,13 @@ namespace WixToolsetTest.UI | |||
361 | "Binary:WixUI_Bmp_Up\t[Binary data]", | 343 | "Binary:WixUI_Bmp_Up\t[Binary data]", |
362 | "Binary:WixUI_Ico_Exclam\t[Binary data]", | 344 | "Binary:WixUI_Ico_Exclam\t[Binary data]", |
363 | "Binary:WixUI_Ico_Info\t[Binary data]", | 345 | "Binary:WixUI_Ico_Info\t[Binary data]", |
364 | "Binary:WixUiCa_X64\t[Binary data]", | ||
365 | }, results.Where(r => r.StartsWith("Binary:")).ToArray()); | 346 | }, results.Where(r => r.StartsWith("Binary:")).ToArray()); |
366 | WixAssert.CompareLineByLine(new[] | 347 | Assert.Empty(results.Where(r => r.StartsWith("CustomAction:")).ToArray()); |
367 | { | ||
368 | "CustomAction:WixUIValidatePath_X64\t65\tWixUiCa_X64\tValidatePath\t", | ||
369 | }, results.Where(r => r.StartsWith("CustomAction:")).ToArray()); | ||
370 | WixAssert.CompareLineByLine(new[] | 348 | WixAssert.CompareLineByLine(new[] |
371 | { | 349 | { |
372 | "Property:WIXUI_INSTALLDIR\tINSTALLFOLDER", | 350 | "Property:WIXUI_INSTALLDIR\tINSTALLFOLDER", |
373 | }, results.Where(r => r.StartsWith("Property:WIXUI")).ToArray()); | 351 | }, results.Where(r => r.StartsWith("Property:WIXUI")).ToArray()); |
374 | WixAssert.CompareLineByLine(new[] | 352 | Assert.Empty(results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).OrderBy(s => s).ToArray()); |
375 | { | ||
376 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_X64\tNOT WIXUI_DONTVALIDATEPATH\t3", | ||
377 | "ControlEvent:InstallDirDlg\tNext\tDoAction\tWixUIValidatePath_X64\tNOT WIXUI_DONTVALIDATEPATH\t2", | ||
378 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).OrderBy(s => s).ToArray()); | ||
379 | WixAssert.CompareLineByLine(new[] | 353 | WixAssert.CompareLineByLine(new[] |
380 | { | 354 | { |
381 | "InstallUISequence:WelcomeDlg\tNOT Installed OR PATCH\t1297", | 355 | "InstallUISequence:WelcomeDlg\tNOT Installed OR PATCH\t1297", |