File tree 1 file changed +3
-4
lines changed
src/client/Microsoft.Identity.Client/ManagedIdentity
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -181,11 +181,11 @@ private bool IsValidPath(string path)
181
181
{
182
182
string expandedExpectedPath = Environment . ExpandEnvironmentVariables ( "%ProgramData%\\ AzureConnectedMachineAgent\\ Tokens\\ " ) ;
183
183
184
- expectedFilePath = expandedExpectedPath + Path . GetFileName ( path ) ;
184
+ expectedFilePath = expandedExpectedPath + Path . GetFileNameWithoutExtension ( path ) + ".key" ;
185
185
}
186
186
else if ( DesktopOsHelper . IsLinux ( ) )
187
187
{
188
- expectedFilePath = "/var/opt/azcmagent/tokens/" + Path . GetFileName ( path ) ;
188
+ expectedFilePath = "/var/opt/azcmagent/tokens/" + Path . GetFileNameWithoutExtension ( path ) + ".key" ;
189
189
}
190
190
else
191
191
{
@@ -194,8 +194,7 @@ private bool IsValidPath(string path)
194
194
MsalErrorMessage . ManagedIdentityPlatformNotSupported ) ;
195
195
}
196
196
197
- return path . Equals ( expectedFilePath , StringComparison . OrdinalIgnoreCase ) &&
198
- path . EndsWith ( ".key" , StringComparison . OrdinalIgnoreCase ) ;
197
+ return path . Equals ( expectedFilePath , StringComparison . OrdinalIgnoreCase ) ;
199
198
}
200
199
}
201
200
}
You can’t perform that action at this time.
0 commit comments