MoK: ReportViewer weiterentwickelt. Ist noch nicht fertig und nur im Debug-Modus sichtbar.
FaC: Quittierungsbeleg für Lisa Wöller GmbH mit Klientenunterschrift und -datum versehen. Quittierungsbeleg von Club 74 mit Quittierungsbelegunterschriften versehen.
This commit is contained in:
@@ -8,7 +8,6 @@ using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
using System.Windows;
|
||||
using BeWo.Data;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
@@ -23,6 +22,8 @@ namespace BeWo.Service.Security
|
||||
|
||||
private static readonly byte[] _Rc2Key = { 174, 130, 219, 185, 185, 221, 96, 50, 37, 212, 81, 121, 71, 206, 130, 153 };
|
||||
|
||||
private static readonly Regex _AuthenticationRegex = new Regex(@"[\&|\?]?token\=[A-Za-z0-9]+|[\&|\?]?tenant\=[A-Za-z0-9]+|[\&|\?]?username\=[A-Za-z0-9.]+");
|
||||
|
||||
public static string EncryptString(string strToEncrypt)
|
||||
{
|
||||
var lRc2CSP = new RC2CryptoServiceProvider();
|
||||
@@ -91,9 +92,7 @@ namespace BeWo.Service.Security
|
||||
|
||||
return HttpUtility.UrlEncode(EncryptString(tokendata));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static bool CheckToken(string token, string link)
|
||||
{
|
||||
if (string.IsNullOrEmpty(token))
|
||||
@@ -335,5 +334,14 @@ namespace BeWo.Service.Security
|
||||
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
public static string RemoveAuthenticationInfoFromUri(string navigateUri)
|
||||
{
|
||||
var splittedUri = _AuthenticationRegex.Split(navigateUri.Split('?')[1]);
|
||||
var cleanedSplittedUri = splittedUri.Where(t => !string.IsNullOrWhiteSpace(t)).ToArray();
|
||||
var uriValues = cleanedSplittedUri.Aggregate(string.Empty, (current, item) => current + item);
|
||||
|
||||
return navigateUri.Split('?')[0] + "?" + uriValues;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user