Skip to content

Commit

Permalink
Update AzureArcManagedIdentitySource.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
neha-bhargava committed Jun 6, 2024
1 parent 61a89f7 commit 8a6fe48
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,15 @@ private void ValidateSplitChallenge(string[] splitChallenge)
}

_requestContext.Logger.Verbose(() => $"[Managed Identity] Challenge is valid. FilePath: {splitChallenge[1]}");
string path = Path.GetFullPath(new Uri(splitChallenge[1]).LocalPath)
.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);


if (!IsValidPath(splitChallenge[1]))
{
throw CreateManagedIdentityException(
MsalError.ManagedIdentityRequestFailed,
MsalErrorMessage.ManagedIdentityInvalidFile);
}

_requestContext.Logger.Verbose(() => $"[Managed Identity] File path is valid. Path: {path}");
_requestContext.Logger.Verbose(() => $"[Managed Identity] File path is valid. Path: {splitChallenge[1]}");

var length = new FileInfo(splitChallenge[1]).Length;

Expand Down

0 comments on commit 8a6fe48

Please sign in to comment.