Do not canonicalize short paths (#736)
This commit is contained in:
parent
c88d37f04d
commit
c06de96bd3
|
|
@ -61,13 +61,17 @@ Return Values:
|
|||
return hr;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (wcslen(pszName) > MAX_PATH)
|
||||
{
|
||||
if (FAILED(hr = pstrPath->Copy(L"\\\\?\\")))
|
||||
{
|
||||
return hr;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pstrPath->Reset();
|
||||
}
|
||||
|
||||
return pstrPath->Append(pszName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ namespace AspNetCoreModuleTests
|
|||
Assert::AreEqual(DWORD(3), retVal);
|
||||
Assert::AreEqual(exeStr, bstrArray[0]);
|
||||
Assert::AreEqual(L"exec", bstrArray[1]);
|
||||
Assert::AreEqual(L"\\\\?\\C:\\test\\test.dll", bstrArray[2]);
|
||||
Assert::AreEqual(L"C:\\test\\test.dll", bstrArray[2]);
|
||||
}
|
||||
|
||||
TEST_METHOD(ParseHostfxrArguments_ProvideNoArgs_InvalidArgs)
|
||||
|
|
|
|||
|
|
@ -28,8 +28,13 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
|
|||
[ConditionalFact]
|
||||
public async Task ReturnsNullForUndefinedServerVariable()
|
||||
{
|
||||
var port = _fixture.Client.BaseAddress.Port;
|
||||
Assert.Equal("THIS_VAR_IS_UNDEFINED: (null)", await _fixture.Client.GetStringAsync("/ServerVariable?q=THIS_VAR_IS_UNDEFINED"));
|
||||
}
|
||||
|
||||
[ConditionalFact]
|
||||
public async Task BasePathIsNotPrefixedBySlashSlashQuestionMark()
|
||||
{
|
||||
Assert.DoesNotContain(@"\\?\", await _fixture.Client.GetStringAsync("/BasePath"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -667,5 +667,10 @@ namespace IISTestSite
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void BasePath(IApplicationBuilder app)
|
||||
{
|
||||
app.Run(async ctx => { await ctx.Response.WriteAsync(AppDomain.CurrentDomain.BaseDirectory); });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue