Skip to content

Commit 2e3ab56

Browse files
ajpinedamagneszitte
authored andcommitted
fix: avoid code injection for directory management
(cherry picked from commit a99e33f)
1 parent 59e6336 commit 2e3ab56

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

UnoCheck/Checkups/XCodeCheckup.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ public override Task<DiagnosticResult> Examine(SharedState history)
9494

9595
// If we do have a sdk version, it means the tools are installed but the iOS SDK runtime is missing
9696
Spectre.Console.AnsiConsole.MarkupLine($"Installing the missing iOS SDK runtime version {sdkVersion}...");
97-
var tempPath = Path.GetTempPath();
97+
98+
var tempPath = Path.Combine(Path.GetTempPath(), $"Uno.Check.iOS-{Guid.NewGuid()}");
99+
Directory.CreateDirectory(tempPath);
98100

99101
return Task.FromResult(new DiagnosticResult(
100102
Status.Error,

0 commit comments

Comments
 (0)