Skip to content

Commit

Permalink
Update StringsExtensions.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Dec 20, 2024
1 parent bdf347f commit 7b85c98
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions identity-server/src/IdentityServer/Extensions/StringsExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,9 @@ public static bool IsUri(this string input)
return false;
}

if (uri.IsFile)
{
// no need to check if input starts with {Uri.UriSchemeFile}:// because uri.IsFile ensures it is either '/' or `file://`
if (!input.StartsWith(Uri.UriSchemeFile, StringComparison.OrdinalIgnoreCase))
{
return false;
}
}

return true;
return !uri.IsFile ||
// no need to check if input starts with {Uri.UriSchemeFile}:// because uri.IsFile ensures it is either '/' or `file://`
input.StartsWith(Uri.UriSchemeFile, StringComparison.OrdinalIgnoreCase);
}

[DebuggerStepThrough]
Expand Down

0 comments on commit 7b85c98

Please sign in to comment.