mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
This is caused by a weird buggy behavior from ASP.NET Core concerning path value decoding. (More information on https://github.com/dotnet/aspnetcore/issues/14170#issuecomment-533342396) This hasn't been fixed for a while, and the dotnet team keeps reporting it over and over.
This commit is contained in:
@@ -36,6 +36,20 @@ namespace BTCPayServer
|
||||
{
|
||||
public static class Extensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Unescape Uri string for %2F
|
||||
/// See details at: https://github.com/dotnet/aspnetcore/issues/14170#issuecomment-533342396
|
||||
/// </summary>
|
||||
/// <param name="uriString">The Uri string.</param>
|
||||
/// <returns>Unescaped back slash Uri string.</returns>
|
||||
public static string UnescapeBackSlashUriString(string uriString)
|
||||
{
|
||||
if (uriString == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return uriString.Replace("%2f", "%2F").Replace("%2F", "/");
|
||||
}
|
||||
public static bool IsValidEmail(this string email)
|
||||
{
|
||||
if (string.IsNullOrEmpty(email))
|
||||
|
||||
Reference in New Issue
Block a user