Skip to content

Commit 4c0cfb6

Browse files
committed
authbase: gracefully handle no-default UI helper case
If there is no hard-coded UI helper, we should gracefully handle the lookup by returning false, rather than crashing due to a argument exception when passing `null` or an empty string to a Path API.
1 parent 571683a commit 4c0cfb6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/shared/Core/Authentication/AuthenticationBase.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ protected bool TryFindHelperCommand(string envar, string configName, string defa
140140

141141
Context.Trace.WriteLine($"UI helper override specified: '{helperName}'.");
142142
}
143+
else if (string.IsNullOrWhiteSpace(defaultValue))
144+
{
145+
Context.Trace.WriteLine("No default UI supplied.");
146+
return false;
147+
}
143148
else
144149
{
145150
Context.Trace.WriteLine($"Using default UI helper: '{defaultValue}'.");

0 commit comments

Comments
 (0)