aboutsummaryrefslogtreecommitdiff
path: root/src/ext/UI/wixext
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2024-09-27 22:09:24 -0400
committerBob Arnson <bob@firegiant.com>2024-09-28 16:23:20 -0400
commitf8d1a711625599ab94630242976a740a4790915e (patch)
treee4fd039b184bd8bd75a438cdb595fffe888c395e /src/ext/UI/wixext
parent526a11b68c1be4817c53b35d0ebdcbe5cfc8edb7 (diff)
downloadwix-bob/WixUIOptInPathValidate_8718.tar.gz
wix-bob/WixUIOptInPathValidate_8718.tar.bz2
wix-bob/WixUIOptInPathValidate_8718.zip
Drop CA path validation in WixUI by default.bob/WixUIOptInPathValidate_8718
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/wixext')
-rw-r--r--src/ext/UI/wixext/UICompiler.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/ext/UI/wixext/UICompiler.cs b/src/ext/UI/wixext/UICompiler.cs
index 5f2751c9..57a0dc16 100644
--- a/src/ext/UI/wixext/UICompiler.cs
+++ b/src/ext/UI/wixext/UICompiler.cs
@@ -56,6 +56,7 @@ namespace WixToolset.UI
56 var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); 56 var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
57 string id = null; 57 string id = null;
58 string installDirectory = null; 58 string installDirectory = null;
59 YesNoType extendedPathValidation = YesNoType.No;
59 60
60 foreach (var attrib in element.Attributes()) 61 foreach (var attrib in element.Attributes())
61 { 62 {
@@ -69,6 +70,9 @@ namespace WixToolset.UI
69 case "InstallDirectory": 70 case "InstallDirectory":
70 installDirectory = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 71 installDirectory = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
71 break; 72 break;
73 case "ExtendedPathValidation":
74 extendedPathValidation = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
75 break;
72 default: 76 default:
73 this.ParseHelper.UnexpectedAttribute(element, attrib); 77 this.ParseHelper.UnexpectedAttribute(element, attrib);
74 break; 78 break;
@@ -87,7 +91,15 @@ namespace WixToolset.UI
87 else 91 else
88 { 92 {
89 var platform = this.Context.Platform == Platform.ARM64 ? "A64" : this.Context.Platform.ToString(); 93 var platform = this.Context.Platform == Platform.ARM64 ? "A64" : this.Context.Platform.ToString();
90 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixUI, $"{id}_{platform}"); 94
95 if (extendedPathValidation == YesNoType.No)
96 {
97 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixUI, $"{id}_{platform}");
98 }
99 else
100 {
101 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixUI, $"{id}_ExtendedPathValidation_{platform}");
102 }
91 103
92 if (installDirectory != null) 104 if (installDirectory != null)
93 { 105 {