Defensive debugging
This commit is contained in:
@@ -44,7 +44,9 @@ namespace Swarmops.Backend.SocketServices
|
||||
protected override void OnOpen()
|
||||
{
|
||||
string authBase64 = Context.QueryString["Auth"];
|
||||
authBase64 = Uri.UnescapeDataString(authBase64); // Defensive programming - % sign does not exist in base64 so this won't ever collapse a working encoding
|
||||
Console.WriteLine(" -- Authbase64 is " + authBase64);
|
||||
|
||||
//authBase64 = Uri.UnescapeDataString(authBase64); // Defensive programming - % sign does not exist in base64 so this won't ever collapse a working encoding
|
||||
|
||||
_systemAuthority = Authority.IsSystemAuthorityTokenValid(authBase64);
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Swarmops.Logic.Security
|
||||
|
||||
public static string GetSystemAuthorityToken(string subsystem)
|
||||
{
|
||||
return EncryptString("Swarmops/" + subsystem + " " + DateTime.UtcNow.ToUnix());
|
||||
return EncryptString("Swarmops/" + subsystem + ";" + DateTime.UtcNow.ToUnix());
|
||||
}
|
||||
|
||||
public static bool IsSystemAuthorityTokenValid(string token)
|
||||
|
||||
Reference in New Issue
Block a user