aspnet/DataProtection

Consider normalizing path used for Discriminator

BrennanConroy opened this issue · 2 comments

public string Discriminator => _hosting?.ContentRootPath;

One specific instance where I hit this was running an app from the command line produced a cookie in my browser. And then running the exact same app without any changes from VS Code would fail to unprotect the cookie because VS Code environment returned e:/... and command line environment returned E:/...

This would probably end up being platform specific - because it shouldn't be case sensitive on windows, but should on linux.

Is there a path normalization function? (You'd be doing the work yourself anyway)

This issue was moved to dotnet/aspnetcore#2507