Defensive debugging

This commit is contained in:
Rick Falkvinge
2017-02-18 13:46:16 +01:00
parent 0614255797
commit 46826bfd95
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -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);
+1 -1
View File
@@ -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)